mirror of
https://github.com/MariaDB/server.git
synced 2025-01-24 15:54:37 +01:00
Merge mysql.com:/home/mydev/mysql-5.1
into mysql.com:/home/mydev/mysql-5.1-bug11527
This commit is contained in:
commit
cab4f3bc7b
23 changed files with 492 additions and 92 deletions
|
@ -4443,49 +4443,6 @@
|
|||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="raid.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Max|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="TLS_DEBUG|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="TLS|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="rijndael.c">
|
||||
<FileConfiguration
|
||||
|
|
|
@ -4526,6 +4526,81 @@
|
|||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="partition_info.cpp">
|
||||
<FileConfiguration
|
||||
Name="classic nt|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Max|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Max nt|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="nt|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="pro nt|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="pro|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="classic|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="parse_file.cpp">
|
||||
<FileConfiguration
|
||||
|
|
|
@ -28,3 +28,11 @@ partitions 3
|
|||
partition x2 values less than (10),
|
||||
partition x3 values less than (20));
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (id INT) ENGINE=NDB
|
||||
PARTITION BY LIST(id)
|
||||
(PARTITION p0 VALUES IN (2, 4),
|
||||
PARTITION p1 VALUES IN (42, 142));
|
||||
INSERT INTO t1 VALUES (2);
|
||||
UPDATE t1 SET id=5 WHERE id=2;
|
||||
ERROR HY000: Table has no partition for value 5
|
||||
DROP TABLE t1;
|
||||
|
|
|
@ -117,3 +117,107 @@ t1 CREATE TABLE `t1` (
|
|||
UNIQUE KEY `a` (`a`)
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (b) (PARTITION x1 VALUES LESS THAN (5) ENGINE = ndbcluster, PARTITION x2 VALUES LESS THAN (10) ENGINE = ndbcluster, PARTITION x3 VALUES LESS THAN (20) ENGINE = ndbcluster)
|
||||
drop table t1;
|
||||
CREATE TABLE t1
|
||||
(id MEDIUMINT NOT NULL,
|
||||
b1 BIT(8),
|
||||
vc VARCHAR(255),
|
||||
bc CHAR(255),
|
||||
d DECIMAL(10,4) DEFAULT 0,
|
||||
f FLOAT DEFAULT 0,
|
||||
total BIGINT UNSIGNED,
|
||||
y YEAR,
|
||||
t DATE) ENGINE=NDB
|
||||
PARTITION BY RANGE (YEAR(t))
|
||||
(PARTITION p0 VALUES LESS THAN (1901),
|
||||
PARTITION p1 VALUES LESS THAN (1946),
|
||||
PARTITION p2 VALUES LESS THAN (1966),
|
||||
PARTITION p3 VALUES LESS THAN (1986),
|
||||
PARTITION p4 VALUES LESS THAN (2005),
|
||||
PARTITION p5 VALUES LESS THAN MAXVALUE);
|
||||
INSERT INTO t1 VALUES (0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
SELECT * FROM t1;
|
||||
id b1 vc bc d f total y t
|
||||
0 NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
ALTER TABLE t1 ENGINE=MYISAM;
|
||||
SELECT * FROM t1;
|
||||
id b1 vc bc d f total y t
|
||||
0 NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
DROP TABLE t1;
|
||||
CREATE LOGFILE GROUP lg1
|
||||
ADD UNDOFILE 'undofile.dat'
|
||||
INITIAL_SIZE 16M
|
||||
UNDO_BUFFER_SIZE=1M
|
||||
ENGINE=NDB;
|
||||
CREATE TABLESPACE ts1
|
||||
ADD DATAFILE 'datafile.dat'
|
||||
USE LOGFILE GROUP lg1
|
||||
INITIAL_SIZE 12M
|
||||
ENGINE NDB;
|
||||
CREATE TABLE test.t1 (
|
||||
a1 INT,
|
||||
a2 TEXT NOT NULL,
|
||||
a3 BIT NOT NULL,
|
||||
a4 DECIMAL(8,3),
|
||||
a5 INT NOT NULL,
|
||||
a6 VARCHAR(255),
|
||||
PRIMARY KEY(a1))
|
||||
TABLESPACE ts1 STORAGE DISK ENGINE=NDB
|
||||
PARTITION BY LIST (a1)
|
||||
(PARTITION p0 VALUES IN (1,2,3,4,5),
|
||||
PARTITION p1 VALUES IN (6,7,8,9, 10),
|
||||
PARTITION p2 VALUES IN (11, 12, 13, 14, 15));
|
||||
SELECT COUNT(*) FROM test.t1;
|
||||
COUNT(*)
|
||||
15
|
||||
ALTER TABLE test.t1 DROP COLUMN a4;
|
||||
SELECT COUNT(*) FROM test.t1;
|
||||
COUNT(*)
|
||||
15
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE test.t1 (
|
||||
a1 INT,
|
||||
a2 TEXT NOT NULL,
|
||||
a3 BIT NOT NULL,
|
||||
a4 DECIMAL(8,3),
|
||||
a5 INT NOT NULL,
|
||||
a6 VARCHAR(255),
|
||||
PRIMARY KEY(a1))
|
||||
TABLESPACE ts1 STORAGE DISK ENGINE=NDB
|
||||
PARTITION BY HASH(a1)
|
||||
PARTITIONS 4;
|
||||
SELECT COUNT(*) FROM test.t1;
|
||||
COUNT(*)
|
||||
15
|
||||
ALTER TABLE test.t1 DROP COLUMN a4;
|
||||
SELECT COUNT(*) FROM test.t1;
|
||||
COUNT(*)
|
||||
15
|
||||
DROP TABLE t1;
|
||||
ALTER TABLESPACE ts1
|
||||
DROP DATAFILE 'datafile.dat'
|
||||
ENGINE=NDB;
|
||||
DROP TABLESPACE ts1 ENGINE=NDB;
|
||||
DROP LOGFILE GROUP lg1 ENGINE=NDB;
|
||||
CREATE TABLE t1
|
||||
(id MEDIUMINT NOT NULL,
|
||||
b1 BIT(8),
|
||||
vc VARCHAR(255),
|
||||
bc CHAR(255),
|
||||
d DECIMAL(10,4) DEFAULT 0,
|
||||
f FLOAT DEFAULT 0,
|
||||
total BIGINT UNSIGNED,
|
||||
y YEAR,
|
||||
t DATE) ENGINE=NDB
|
||||
PARTITION BY LIST(id)
|
||||
(PARTITION p0 VALUES IN (2, 4),
|
||||
PARTITION p1 VALUES IN (42, 142));
|
||||
INSERT INTO t1 VALUES (2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
SELECT * FROM t1;
|
||||
id b1 vc bc d f total y t
|
||||
2 NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
ALTER TABLE t1 ADD PARTITION
|
||||
(PARTITION p2 VALUES IN (412));
|
||||
SELECT * FROM t1;
|
||||
id b1 vc bc d f total y t
|
||||
2 NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
DROP TABLE t1;
|
||||
|
|
|
@ -544,3 +544,5 @@ extractvalue('<a>a<b>B</b></a>','a|/b')
|
|||
a
|
||||
select extractvalue('<a>A</a>','/<a>');
|
||||
ERROR HY000: XPATH syntax error: '>'
|
||||
select extractvalue('<a><b>b</b><b!>b!</b!></a>','//b!');
|
||||
ERROR HY000: XPATH syntax error: '!'
|
||||
|
|
|
@ -44,3 +44,15 @@ partitions 3
|
|||
partition x3 values less than (20));
|
||||
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug #17763 mysqld cores with list partitioning if update to missing partition
|
||||
#
|
||||
CREATE TABLE t1 (id INT) ENGINE=NDB
|
||||
PARTITION BY LIST(id)
|
||||
(PARTITION p0 VALUES IN (2, 4),
|
||||
PARTITION p1 VALUES IN (42, 142));
|
||||
INSERT INTO t1 VALUES (2);
|
||||
--error ER_NO_PARTITION_FOR_GIVEN_VALUE
|
||||
UPDATE t1 SET id=5 WHERE id=2;
|
||||
DROP TABLE t1;
|
||||
|
|
|
@ -93,3 +93,133 @@ show create table t1;
|
|||
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug #17499, #17687
|
||||
# Alter partitioned NDB table causes mysqld to core
|
||||
#
|
||||
|
||||
CREATE TABLE t1
|
||||
(id MEDIUMINT NOT NULL,
|
||||
b1 BIT(8),
|
||||
vc VARCHAR(255),
|
||||
bc CHAR(255),
|
||||
d DECIMAL(10,4) DEFAULT 0,
|
||||
f FLOAT DEFAULT 0,
|
||||
total BIGINT UNSIGNED,
|
||||
y YEAR,
|
||||
t DATE) ENGINE=NDB
|
||||
PARTITION BY RANGE (YEAR(t))
|
||||
(PARTITION p0 VALUES LESS THAN (1901),
|
||||
PARTITION p1 VALUES LESS THAN (1946),
|
||||
PARTITION p2 VALUES LESS THAN (1966),
|
||||
PARTITION p3 VALUES LESS THAN (1986),
|
||||
PARTITION p4 VALUES LESS THAN (2005),
|
||||
PARTITION p5 VALUES LESS THAN MAXVALUE);
|
||||
|
||||
INSERT INTO t1 VALUES (0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
SELECT * FROM t1;
|
||||
ALTER TABLE t1 ENGINE=MYISAM;
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
CREATE LOGFILE GROUP lg1
|
||||
ADD UNDOFILE 'undofile.dat'
|
||||
INITIAL_SIZE 16M
|
||||
UNDO_BUFFER_SIZE=1M
|
||||
ENGINE=NDB;
|
||||
|
||||
CREATE TABLESPACE ts1
|
||||
ADD DATAFILE 'datafile.dat'
|
||||
USE LOGFILE GROUP lg1
|
||||
INITIAL_SIZE 12M
|
||||
ENGINE NDB;
|
||||
|
||||
CREATE TABLE test.t1 (
|
||||
a1 INT,
|
||||
a2 TEXT NOT NULL,
|
||||
a3 BIT NOT NULL,
|
||||
a4 DECIMAL(8,3),
|
||||
a5 INT NOT NULL,
|
||||
a6 VARCHAR(255),
|
||||
PRIMARY KEY(a1))
|
||||
TABLESPACE ts1 STORAGE DISK ENGINE=NDB
|
||||
PARTITION BY LIST (a1)
|
||||
(PARTITION p0 VALUES IN (1,2,3,4,5),
|
||||
PARTITION p1 VALUES IN (6,7,8,9, 10),
|
||||
PARTITION p2 VALUES IN (11, 12, 13, 14, 15));
|
||||
|
||||
let $j= 15;
|
||||
--disable_query_log
|
||||
while ($j)
|
||||
{
|
||||
eval INSERT INTO test.t1 VALUES ($j, "Tested Remotely from Texas, USA",
|
||||
b'1',$j.00,$j+1,"By NIK $j");
|
||||
dec $j;
|
||||
}
|
||||
--enable_query_log
|
||||
SELECT COUNT(*) FROM test.t1;
|
||||
|
||||
ALTER TABLE test.t1 DROP COLUMN a4;
|
||||
SELECT COUNT(*) FROM test.t1;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
CREATE TABLE test.t1 (
|
||||
a1 INT,
|
||||
a2 TEXT NOT NULL,
|
||||
a3 BIT NOT NULL,
|
||||
a4 DECIMAL(8,3),
|
||||
a5 INT NOT NULL,
|
||||
a6 VARCHAR(255),
|
||||
PRIMARY KEY(a1))
|
||||
TABLESPACE ts1 STORAGE DISK ENGINE=NDB
|
||||
PARTITION BY HASH(a1)
|
||||
PARTITIONS 4;
|
||||
|
||||
let $j= 15;
|
||||
--disable_query_log
|
||||
while ($j)
|
||||
{
|
||||
eval INSERT INTO test.t1 VALUES ($j, "Tested Remotely from Texas, USA",
|
||||
b'1',$j.00,$j+1,"By NIK $j");
|
||||
dec $j;
|
||||
}
|
||||
--enable_query_log
|
||||
SELECT COUNT(*) FROM test.t1;
|
||||
|
||||
ALTER TABLE test.t1 DROP COLUMN a4;
|
||||
SELECT COUNT(*) FROM test.t1;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
ALTER TABLESPACE ts1
|
||||
DROP DATAFILE 'datafile.dat'
|
||||
ENGINE=NDB;
|
||||
DROP TABLESPACE ts1 ENGINE=NDB;
|
||||
DROP LOGFILE GROUP lg1 ENGINE=NDB;
|
||||
|
||||
|
||||
#
|
||||
# Bug #17701 ALTER TABLE t1 ADD PARTITION for PARTITION BY LIST hangs test
|
||||
#
|
||||
|
||||
CREATE TABLE t1
|
||||
(id MEDIUMINT NOT NULL,
|
||||
b1 BIT(8),
|
||||
vc VARCHAR(255),
|
||||
bc CHAR(255),
|
||||
d DECIMAL(10,4) DEFAULT 0,
|
||||
f FLOAT DEFAULT 0,
|
||||
total BIGINT UNSIGNED,
|
||||
y YEAR,
|
||||
t DATE) ENGINE=NDB
|
||||
PARTITION BY LIST(id)
|
||||
(PARTITION p0 VALUES IN (2, 4),
|
||||
PARTITION p1 VALUES IN (42, 142));
|
||||
|
||||
INSERT INTO t1 VALUES (2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
SELECT * FROM t1;
|
||||
ALTER TABLE t1 ADD PARTITION
|
||||
(PARTITION p2 VALUES IN (412));
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
|
|
@ -237,3 +237,9 @@ select extractvalue('<a>a<b>B</b></a>','a|/b');
|
|||
#
|
||||
--error 1105
|
||||
select extractvalue('<a>A</a>','/<a>');
|
||||
|
||||
#
|
||||
# Bug#16313 XML: extractvalue() ignores '!' in names
|
||||
#
|
||||
--error 1105
|
||||
select extractvalue('<a><b>b</b><b!>b!</b!></a>','//b!');
|
||||
|
|
|
@ -3381,8 +3381,13 @@ int ha_ndbcluster::extra(enum ha_extra_function operation)
|
|||
DBUG_PRINT("info", ("HA_EXTRA_RESET"));
|
||||
DBUG_PRINT("info", ("Clearing condition stack"));
|
||||
cond_clear();
|
||||
/*
|
||||
* Regular partition pruning will set the bitmap appropriately.
|
||||
* Some queries like ALTER TABLE doesn't use partition pruning and
|
||||
* thus the 'used_partitions' bitmap needs to be initialized
|
||||
*/
|
||||
if (m_part_info)
|
||||
bitmap_clear_all(&m_part_info->used_partitions);
|
||||
bitmap_set_all(&m_part_info->used_partitions);
|
||||
break;
|
||||
case HA_EXTRA_IGNORE_DUP_KEY: /* Dup keys don't rollback everything*/
|
||||
DBUG_PRINT("info", ("HA_EXTRA_IGNORE_DUP_KEY"));
|
||||
|
@ -5988,8 +5993,11 @@ void ha_ndbcluster::print_error(int error, myf errflag)
|
|||
DBUG_PRINT("enter", ("error = %d", error));
|
||||
|
||||
if (error == HA_ERR_NO_PARTITION_FOUND)
|
||||
{
|
||||
char buf[100];
|
||||
my_error(ER_NO_PARTITION_FOR_GIVEN_VALUE, MYF(0),
|
||||
(int)m_part_info->part_expr->val_int());
|
||||
llstr(m_part_info->part_expr->val_int(), buf));
|
||||
}
|
||||
else
|
||||
handler::print_error(error, errflag);
|
||||
DBUG_VOID_RETURN;
|
||||
|
|
|
@ -284,11 +284,11 @@ ndbcluster_binlog_open_table(THD *thd, NDB_SHARE *share,
|
|||
it may be in use by the injector thread
|
||||
*/
|
||||
share->ndb_value[0]= (NdbValue*)
|
||||
alloc_root(mem_root, sizeof(NdbValue) * table->s->fields
|
||||
+ 1 /*extra for hidden key*/);
|
||||
alloc_root(mem_root, sizeof(NdbValue) *
|
||||
(table->s->fields + 2 /*extra for hidden key and part key*/));
|
||||
share->ndb_value[1]= (NdbValue*)
|
||||
alloc_root(mem_root, sizeof(NdbValue) * table->s->fields
|
||||
+1 /*extra for hidden key*/);
|
||||
alloc_root(mem_root, sizeof(NdbValue) *
|
||||
(table->s->fields + 2 /*extra for hidden key and part key*/));
|
||||
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
|
|
@ -130,6 +130,34 @@
|
|||
#define HA_ONLINE_DROP_UNIQUE_INDEX (1L << 9) /*drop uniq. online*/
|
||||
#define HA_ONLINE_ADD_PK_INDEX (1L << 10)/*add prim. online*/
|
||||
#define HA_ONLINE_DROP_PK_INDEX (1L << 11)/*drop prim. online*/
|
||||
/*
|
||||
HA_PARTITION_FUNCTION_SUPPORTED indicates that the function is
|
||||
supported at all.
|
||||
HA_FAST_CHANGE_PARTITION means that optimised variants of the changes
|
||||
exists but they are not necessarily done online.
|
||||
|
||||
HA_ONLINE_DOUBLE_WRITE means that the handler supports writing to both
|
||||
the new partition and to the old partitions when updating through the
|
||||
old partitioning schema while performing a change of the partitioning.
|
||||
This means that we can support updating of the table while performing
|
||||
the copy phase of the change. For no lock at all also a double write
|
||||
from new to old must exist and this is not required when this flag is
|
||||
set.
|
||||
This is actually removed even before it was introduced the first time.
|
||||
The new idea is that handlers will handle the lock level already in
|
||||
store_lock for ALTER TABLE partitions.
|
||||
|
||||
HA_PARTITION_ONE_PHASE is a flag that can be set by handlers that take
|
||||
care of changing the partitions online and in one phase. Thus all phases
|
||||
needed to handle the change are implemented inside the storage engine.
|
||||
The storage engine must also support auto-discovery since the frm file
|
||||
is changed as part of the change and this change must be controlled by
|
||||
the storage engine. A typical engine to support this is NDB (through
|
||||
WL #2498).
|
||||
*/
|
||||
#define HA_PARTITION_FUNCTION_SUPPORTED (1L << 12)
|
||||
#define HA_FAST_CHANGE_PARTITION (1L << 13)
|
||||
#define HA_PARTITION_ONE_PHASE (1L << 14)
|
||||
|
||||
/*
|
||||
Index scan will not return records in rowid order. Not guaranteed to be
|
||||
|
|
|
@ -1976,8 +1976,17 @@ static int my_xpath_parse_AndExpr(MY_XPATH *xpath)
|
|||
*/
|
||||
static int my_xpath_parse_ne(MY_XPATH *xpath)
|
||||
{
|
||||
return my_xpath_parse_term(xpath, MY_XPATH_LEX_EXCL) &&
|
||||
my_xpath_parse_term(xpath, MY_XPATH_LEX_EQ);
|
||||
MY_XPATH_LEX prevtok= xpath->prevtok;
|
||||
if (!my_xpath_parse_term(xpath, MY_XPATH_LEX_EXCL))
|
||||
return 0;
|
||||
if (!my_xpath_parse_term(xpath, MY_XPATH_LEX_EQ))
|
||||
{
|
||||
/* Unget the exclamation mark */
|
||||
xpath->lasttok= xpath->prevtok;
|
||||
xpath->prevtok= prevtok;
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
static int my_xpath_parse_EqualityOperator(MY_XPATH *xpath)
|
||||
{
|
||||
|
|
|
@ -5598,13 +5598,14 @@ bool Rows_log_event::write_data_body(IO_CACHE*file)
|
|||
Note that this should be the number of *bits*, not the number of
|
||||
bytes.
|
||||
*/
|
||||
byte sbuf[sizeof(m_width)];
|
||||
char sbuf[sizeof(m_width)];
|
||||
my_ptrdiff_t const data_size= m_rows_cur - m_rows_buf;
|
||||
|
||||
char *const sbuf_end= net_store_length(sbuf, (uint) m_width);
|
||||
DBUG_ASSERT(static_cast<my_size_t>(sbuf_end - (char*) sbuf) <= sizeof(sbuf));
|
||||
DBUG_ASSERT(static_cast<my_size_t>(sbuf_end - sbuf) <= sizeof(sbuf));
|
||||
|
||||
return (my_b_safe_write(file, sbuf, sbuf_end - (char*) sbuf) ||
|
||||
return (my_b_safe_write(file, reinterpret_cast<byte*>(sbuf),
|
||||
sbuf_end - sbuf) ||
|
||||
my_b_safe_write(file, reinterpret_cast<byte*>(m_cols.bitmap),
|
||||
no_bytes_in_map(&m_cols)) ||
|
||||
my_b_safe_write(file, m_rows_buf, data_size));
|
||||
|
@ -6048,15 +6049,16 @@ bool Table_map_log_event::write_data_body(IO_CACHE *file)
|
|||
byte const dbuf[]= { m_dblen };
|
||||
byte const tbuf[]= { m_tbllen };
|
||||
|
||||
byte cbuf[sizeof(m_colcnt)];
|
||||
char cbuf[sizeof(m_colcnt)];
|
||||
char *const cbuf_end= net_store_length(cbuf, (uint) m_colcnt);
|
||||
DBUG_ASSERT(static_cast<my_size_t>(cbuf_end - (char*) cbuf) <= sizeof(cbuf));
|
||||
DBUG_ASSERT(static_cast<my_size_t>(cbuf_end - cbuf) <= sizeof(cbuf));
|
||||
|
||||
return (my_b_safe_write(file, dbuf, sizeof(dbuf)) ||
|
||||
my_b_safe_write(file, (const byte*)m_dbnam, m_dblen+1) ||
|
||||
my_b_safe_write(file, tbuf, sizeof(tbuf)) ||
|
||||
my_b_safe_write(file, (const byte*)m_tblnam, m_tbllen+1) ||
|
||||
my_b_safe_write(file, cbuf, cbuf_end - cbuf) ||
|
||||
my_b_safe_write(file, reinterpret_cast<byte*>(cbuf),
|
||||
cbuf_end - cbuf) ||
|
||||
my_b_safe_write(file, reinterpret_cast<byte*>(m_coltype), m_colcnt));
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -4011,7 +4011,7 @@ uint prep_alter_part_table(THD *thd, TABLE *table, ALTER_INFO *alter_info,
|
|||
is freed by setting version to 0. table->s->version= 0 forces a
|
||||
flush of the table object in close_thread_tables().
|
||||
*/
|
||||
uint flags;
|
||||
uint flags= 0;
|
||||
table->s->version= 0L;
|
||||
if (alter_info->flags == ALTER_TABLE_REORG)
|
||||
{
|
||||
|
@ -4060,7 +4060,10 @@ uint prep_alter_part_table(THD *thd, TABLE *table, ALTER_INFO *alter_info,
|
|||
my_error(ER_PARTITION_FUNCTION_FAILURE, MYF(0));
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
*fast_alter_partition= flags ^ HA_PARTITION_FUNCTION_SUPPORTED;
|
||||
*fast_alter_partition=
|
||||
((flags & (HA_FAST_CHANGE_PARTITION | HA_PARTITION_ONE_PHASE)) != 0);
|
||||
DBUG_PRINT("info", ("*fast_alter_partition: %d flags: 0x%x",
|
||||
*fast_alter_partition, flags));
|
||||
if (alter_info->flags & ALTER_ADD_PARTITION)
|
||||
{
|
||||
/*
|
||||
|
@ -4660,7 +4663,6 @@ the generated partition syntax in a correct manner.
|
|||
DBUG_ASSERT(FALSE);
|
||||
}
|
||||
*partition_changed= TRUE;
|
||||
create_info->db_type= &partition_hton;
|
||||
thd->lex->part_info= tab_part_info;
|
||||
if (alter_info->flags == ALTER_ADD_PARTITION ||
|
||||
alter_info->flags == ALTER_REORGANIZE_PARTITION)
|
||||
|
|
|
@ -24,35 +24,6 @@
|
|||
#define HA_CAN_PARTITION_UNIQUE (1 << 2)
|
||||
#define HA_USE_AUTO_PARTITION (1 << 3)
|
||||
|
||||
/*
|
||||
HA_PARTITION_FUNCTION_SUPPORTED indicates that the function is
|
||||
supported at all.
|
||||
HA_FAST_CHANGE_PARTITION means that optimised variants of the changes
|
||||
exists but they are not necessarily done online.
|
||||
|
||||
HA_ONLINE_DOUBLE_WRITE means that the handler supports writing to both
|
||||
the new partition and to the old partitions when updating through the
|
||||
old partitioning schema while performing a change of the partitioning.
|
||||
This means that we can support updating of the table while performing
|
||||
the copy phase of the change. For no lock at all also a double write
|
||||
from new to old must exist and this is not required when this flag is
|
||||
set.
|
||||
This is actually removed even before it was introduced the first time.
|
||||
The new idea is that handlers will handle the lock level already in
|
||||
store_lock for ALTER TABLE partitions.
|
||||
|
||||
HA_PARTITION_ONE_PHASE is a flag that can be set by handlers that take
|
||||
care of changing the partitions online and in one phase. Thus all phases
|
||||
needed to handle the change are implemented inside the storage engine.
|
||||
The storage engine must also support auto-discovery since the frm file
|
||||
is changed as part of the change and this change must be controlled by
|
||||
the storage engine. A typical engine to support this is NDB (through
|
||||
WL #2498).
|
||||
*/
|
||||
#define HA_PARTITION_FUNCTION_SUPPORTED (1L << 12)
|
||||
#define HA_FAST_CHANGE_PARTITION (1L << 13)
|
||||
#define HA_PARTITION_ONE_PHASE (1L << 14)
|
||||
|
||||
/*typedef struct {
|
||||
ulonglong data_file_length;
|
||||
ulonglong max_data_file_length;
|
||||
|
|
|
@ -32,4 +32,5 @@ ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR CMAKE_GENERATOR MATCHES "Visu
|
|||
ADD_DEFINITIONS("-D_WINDOWS -D__WIN__")
|
||||
|
||||
SUBDIRS(vio dbug strings regex mysys extra zlib storage/innobase storage/heap storage/myisam storage/myisammrg
|
||||
extra/yassl extra/yassl/taocrypt client sql server-tools/instance-manager)
|
||||
extra/yassl extra/yassl/taocrypt client sql server-tools/instance-manager
|
||||
libmysql tests)
|
||||
|
|
|
@ -3,7 +3,7 @@ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
|
|||
|
||||
# The old Windows build method used renamed (.cc -> .cpp) source files, fails
|
||||
# in #include in mysqlbinlog.cc. So disable that using the USING_CMAKE define.
|
||||
ADD_DEFINITIONS(-DUSE_TLS -DUSING_CMAKE)
|
||||
ADD_DEFINITIONS(-DUSING_CMAKE)
|
||||
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
|
||||
${CMAKE_SOURCE_DIR}/zlib
|
||||
${CMAKE_SOURCE_DIR}/extra/yassl/include
|
||||
|
@ -75,3 +75,6 @@ TARGET_LINK_LIBRARIES(mysqlbinlog mysqlclient dbug yassl zlib wsock32)
|
|||
|
||||
ADD_EXECUTABLE(mysqladmin mysqladmin.cc)
|
||||
TARGET_LINK_LIBRARIES(mysqladmin mysqlclient mysys dbug yassl zlib wsock32)
|
||||
|
||||
ADD_EXECUTABLE(mysqlslap mysqlslap.c)
|
||||
TARGET_LINK_LIBRARIES(mysqlslap mysqlclient mysys zlib wsock32)
|
||||
|
|
|
@ -17,3 +17,5 @@ copy innobase ..\..\storage\innobase\cmakelists.txt
|
|||
copy myisam ..\..\storage\myisam\cmakelists.txt
|
||||
copy myisammrg ..\..\storage\myisammrg\cmakelists.txt
|
||||
copy im ..\..\server-tools\instance-manager\cmakelists.txt
|
||||
copy libmysql ..\..\libmysql\cmakelists.txt
|
||||
copy tests ..\..\tests\cmakelists.txt
|
||||
|
|
|
@ -21,3 +21,9 @@ ADD_CUSTOM_TARGET(GenError
|
|||
|
||||
ADD_EXECUTABLE(my_print_defaults my_print_defaults.c)
|
||||
TARGET_LINK_LIBRARIES(my_print_defaults strings mysys dbug taocrypt odbc32 odbccp32 wsock32)
|
||||
|
||||
ADD_EXECUTABLE(perror perror.c)
|
||||
TARGET_LINK_LIBRARIES(perror strings mysys dbug wsock32)
|
||||
|
||||
ADD_EXECUTABLE(replace replace.c)
|
||||
TARGET_LINK_LIBRARIES(replace strings mysys dbug wsock32)
|
||||
|
|
53
win/cmakefiles/libmysql
Normal file
53
win/cmakefiles/libmysql
Normal file
|
@ -0,0 +1,53 @@
|
|||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
|
||||
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
|
||||
|
||||
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
|
||||
${CMAKE_SOURCE_DIR}/zlib
|
||||
${CMAKE_SOURCE_DIR}/extra/yassl/include
|
||||
${CMAKE_SOURCE_DIR}/libmysql
|
||||
${CMAKE_SOURCE_DIR}/regex
|
||||
${CMAKE_SOURCE_DIR}/sql
|
||||
${CMAKE_SOURCE_DIR}/strings)
|
||||
|
||||
ADD_LIBRARY(libmysql MODULE dll.c libmysql.def
|
||||
../mysys/array.c ../strings/bchange.c ../strings/bmove.c
|
||||
../strings/bmove_upp.c ../mysys/charset-def.c ../mysys/charset.c
|
||||
../sql-common/client.c ../strings/ctype-big5.c ../strings/ctype-bin.c
|
||||
../strings/ctype-cp932.c ../strings/ctype-czech.c ../strings/ctype-euc_kr.c
|
||||
../strings/ctype-eucjpms.c ../strings/ctype-extra.c ../strings/ctype-gb2312.c
|
||||
../strings/ctype-gbk.c ../strings/ctype-latin1.c ../strings/ctype-mb.c
|
||||
../strings/ctype-simple.c ../strings/ctype-sjis.c ../strings/ctype-tis620.c
|
||||
../strings/ctype-uca.c ../strings/ctype-ucs2.c ../strings/ctype-ujis.c
|
||||
../strings/ctype-utf8.c ../strings/ctype-win1250ch.c ../strings/ctype.c
|
||||
../mysys/default.c ../libmysql/errmsg.c ../mysys/errors.c
|
||||
../libmysql/get_password.c ../strings/int2str.c ../strings/is_prefix.c
|
||||
../libmysql/libmysql.c ../mysys/list.c ../strings/llstr.c
|
||||
../strings/longlong2str.c ../libmysql/manager.c ../mysys/mf_cache.c
|
||||
../mysys/mf_dirname.c ../mysys/mf_fn_ext.c ../mysys/mf_format.c
|
||||
../mysys/mf_iocache.c ../mysys/mf_iocache2.c ../mysys/mf_loadpath.c
|
||||
../mysys/mf_pack.c ../mysys/mf_path.c ../mysys/mf_tempfile.c ../mysys/mf_unixpath.c
|
||||
../mysys/mf_wcomp.c ../mysys/mulalloc.c ../mysys/my_access.c ../mysys/my_alloc.c
|
||||
../mysys/my_chsize.c ../mysys/my_compress.c ../mysys/my_create.c
|
||||
../mysys/my_delete.c ../mysys/my_div.c ../mysys/my_error.c ../mysys/my_file.c
|
||||
../mysys/my_fopen.c ../mysys/my_fstream.c ../mysys/my_gethostbyname.c
|
||||
../mysys/my_getopt.c ../mysys/my_getwd.c ../mysys/my_init.c ../mysys/my_lib.c
|
||||
../mysys/my_malloc.c ../mysys/my_messnc.c ../mysys/my_net.c ../mysys/my_once.c
|
||||
../mysys/my_open.c ../mysys/my_pread.c ../mysys/my_pthread.c ../mysys/my_read.c
|
||||
../mysys/my_realloc.c ../mysys/my_rename.c ../mysys/my_seek.c
|
||||
../mysys/my_static.c ../strings/my_strtoll10.c ../mysys/my_symlink.c
|
||||
../mysys/my_symlink2.c ../mysys/my_thr_init.c ../sql-common/my_time.c
|
||||
../strings/my_vsnprintf.c ../mysys/my_wincond.c ../mysys/my_winthread.c
|
||||
../mysys/my_write.c ../sql/net_serv.cc ../sql-common/pack.c ../sql/password.c
|
||||
../mysys/safemalloc.c ../mysys/sha1.c ../strings/str2int.c
|
||||
../strings/str_alloc.c ../strings/strcend.c ../strings/strcont.c ../strings/strend.c
|
||||
../strings/strfill.c ../mysys/string.c ../strings/strinstr.c ../strings/strmake.c
|
||||
../strings/strmov.c ../strings/strnlen.c ../strings/strnmov.c ../strings/strtod.c
|
||||
../strings/strtoll.c ../strings/strtoull.c ../strings/strxmov.c ../strings/strxnmov.c
|
||||
../mysys/thr_mutex.c ../mysys/typelib.c ../vio/vio.c ../vio/viosocket.c
|
||||
../vio/viossl.c ../vio/viosslfactories.c ../strings/xml.c)
|
||||
ADD_DEPENDENCIES(libmysql GenError zlib)
|
||||
TARGET_LINK_LIBRARIES(libmysql mysys strings wsock32)
|
||||
|
||||
# ToDo: We should move the mytest.c program out in libmysql/
|
||||
ADD_EXECUTABLE(myTest ../VC++Files/libmysqltest/mytest.c)
|
||||
TARGET_LINK_LIBRARIES(myTest libmysql)
|
|
@ -12,3 +12,15 @@ ADD_LIBRARY(myisam ft_boolean_search.c ft_nlq_search.c ft_parser.c ft_static.c f
|
|||
mi_rsame.c mi_rsamepos.c mi_scan.c mi_search.c mi_static.c mi_statrec.c
|
||||
mi_unique.c mi_update.c mi_write.c rt_index.c rt_key.c rt_mbr.c
|
||||
rt_split.c sort.c sp_key.c ft_eval.h myisamdef.h rt_index.h mi_rkey.c)
|
||||
|
||||
ADD_EXECUTABLE(myisam_ftdump myisam_ftdump.c)
|
||||
TARGET_LINK_LIBRARIES(myisam_ftdump myisam mysys dbug strings zlib wsock32)
|
||||
|
||||
ADD_EXECUTABLE(myisamchk myisamchk.c)
|
||||
TARGET_LINK_LIBRARIES(myisamchk myisam mysys dbug strings zlib wsock32)
|
||||
|
||||
ADD_EXECUTABLE(myisamlog myisamlog.c)
|
||||
TARGET_LINK_LIBRARIES(myisamlog myisam mysys dbug strings zlib wsock32)
|
||||
|
||||
ADD_EXECUTABLE(myisampack myisampack.c)
|
||||
TARGET_LINK_LIBRARIES(myisampack myisam mysys dbug strings zlib wsock32)
|
||||
|
|
|
@ -16,6 +16,6 @@ ADD_LIBRARY(mysys array.c charset-def.c charset.c checksum.c default.c default_m
|
|||
my_mkdir.c my_mmap.c my_net.c my_once.c my_open.c my_pread.c my_pthread.c
|
||||
my_quick.c my_read.c my_realloc.c my_redel.c my_rename.c my_seek.c my_sleep.c
|
||||
my_static.c my_symlink.c my_symlink2.c my_sync.c my_thr_init.c my_wincond.c
|
||||
my_windac.c my_winsem.c my_winthread.c my_write.c ptr_cmp.c queues.c raid.cc
|
||||
my_windac.c my_winsem.c my_winthread.c my_write.c ptr_cmp.c queues.c
|
||||
rijndael.c safemalloc.c sha1.c string.c thr_alarm.c thr_lock.c thr_mutex.c
|
||||
thr_rwlock.c tree.c typelib.c my_vle.c base64.c)
|
||||
|
|
9
win/cmakefiles/tests
Normal file
9
win/cmakefiles/tests
Normal file
|
@ -0,0 +1,9 @@
|
|||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
|
||||
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
|
||||
|
||||
ADD_DEFINITIONS("-DMYSQL_CLIENT")
|
||||
|
||||
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
|
||||
|
||||
ADD_EXECUTABLE(mysql_client_test mysql_client_test.c)
|
||||
TARGET_LINK_LIBRARIES(mysql_client_test mysqlclient zlib wsock32)
|
Loading…
Add table
Reference in a new issue