mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into mysql.com:/home/jonas/src/mysql-5.0-ndb
This commit is contained in:
@ -278,7 +278,7 @@ if (defined $opt_changelog)
|
|||||||
unless ($opt_skip_manual)
|
unless ($opt_skip_manual)
|
||||||
{
|
{
|
||||||
&logger("Updating manual files");
|
&logger("Updating manual files");
|
||||||
foreach $file qw/internals manual reservedwords/
|
foreach $file qw/internals manual reservedwords errmsg-table cl-errmsg-table/
|
||||||
{
|
{
|
||||||
system ("bk cat $opt_docdir/Docs/$file.texi > $target_dir/Docs/$file.texi") == 0
|
system ("bk cat $opt_docdir/Docs/$file.texi > $target_dir/Docs/$file.texi") == 0
|
||||||
or &abort("Could not update $file.texi in $target_dir/Docs/!");
|
or &abort("Could not update $file.texi in $target_dir/Docs/!");
|
||||||
|
@ -344,7 +344,7 @@ SOURCE=..\mysys\my_alloc.c
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\mysys\my_decimal.cpp
|
SOURCE=..\sql\my_decimal.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
@ -235,13 +235,17 @@ auto
|
|||||||
4
|
4
|
||||||
select auto from t1 where
|
select auto from t1 where
|
||||||
string like "b%" and
|
string like "b%" and
|
||||||
vstring like "b%"
|
vstring like "b%" and
|
||||||
|
bin like concat(0xBB, '%') and
|
||||||
|
vbin like concat(0xBB, '%')
|
||||||
order by auto;
|
order by auto;
|
||||||
auto
|
auto
|
||||||
2
|
2
|
||||||
select auto from t1 where
|
select auto from t1 where
|
||||||
string not like "b%" and
|
string not like "b%" and
|
||||||
vstring not like "b%"
|
vstring not like "b%" and
|
||||||
|
bin not like concat(0xBB, '%') and
|
||||||
|
vbin not like concat(0xBB, '%')
|
||||||
order by auto;
|
order by auto;
|
||||||
auto
|
auto
|
||||||
1
|
1
|
||||||
@ -637,13 +641,17 @@ auto
|
|||||||
4
|
4
|
||||||
select auto from t1 where
|
select auto from t1 where
|
||||||
string like "b%" and
|
string like "b%" and
|
||||||
vstring like "b%"
|
vstring like "b%" and
|
||||||
|
bin like concat(0xBB, '%') and
|
||||||
|
vbin like concat(0xBB, '%')
|
||||||
order by auto;
|
order by auto;
|
||||||
auto
|
auto
|
||||||
2
|
2
|
||||||
select auto from t1 where
|
select auto from t1 where
|
||||||
string not like "b%" and
|
string not like "b%" and
|
||||||
vstring not like "b%"
|
vstring not like "b%" and
|
||||||
|
bin not like concat(0xBB, '%') and
|
||||||
|
vbin not like concat(0xBB, '%')
|
||||||
order by auto;
|
order by auto;
|
||||||
auto
|
auto
|
||||||
1
|
1
|
||||||
|
@ -656,7 +656,6 @@ delete from t1|
|
|||||||
drop table if exists t3|
|
drop table if exists t3|
|
||||||
create table t3 ( s char(16), d int)|
|
create table t3 ( s char(16), d int)|
|
||||||
call into_test4()|
|
call into_test4()|
|
||||||
Warnings:
|
|
||||||
select * from t3|
|
select * from t3|
|
||||||
s d
|
s d
|
||||||
into4 NULL
|
into4 NULL
|
||||||
@ -1344,9 +1343,7 @@ end if;
|
|||||||
insert into t4 values (2, rc, t3);
|
insert into t4 values (2, rc, t3);
|
||||||
end|
|
end|
|
||||||
call bug1863(10)|
|
call bug1863(10)|
|
||||||
Warnings:
|
|
||||||
call bug1863(10)|
|
call bug1863(10)|
|
||||||
Warnings:
|
|
||||||
select * from t4|
|
select * from t4|
|
||||||
f1 rc t3
|
f1 rc t3
|
||||||
2 0 NULL
|
2 0 NULL
|
||||||
@ -1643,9 +1640,7 @@ begin
|
|||||||
end|
|
end|
|
||||||
call bug4579_1()|
|
call bug4579_1()|
|
||||||
call bug4579_1()|
|
call bug4579_1()|
|
||||||
Warnings:
|
|
||||||
call bug4579_1()|
|
call bug4579_1()|
|
||||||
Warnings:
|
|
||||||
drop procedure bug4579_1|
|
drop procedure bug4579_1|
|
||||||
drop procedure bug4579_2|
|
drop procedure bug4579_2|
|
||||||
drop table t3|
|
drop table t3|
|
||||||
@ -2118,12 +2113,16 @@ var
|
|||||||
call bug7743("OneWord")|
|
call bug7743("OneWord")|
|
||||||
var
|
var
|
||||||
NULL
|
NULL
|
||||||
|
Warnings:
|
||||||
|
Warning 1329 No data to FETCH
|
||||||
call bug7743("anotherword")|
|
call bug7743("anotherword")|
|
||||||
var
|
var
|
||||||
2
|
2
|
||||||
call bug7743("AnotherWord")|
|
call bug7743("AnotherWord")|
|
||||||
var
|
var
|
||||||
NULL
|
NULL
|
||||||
|
Warnings:
|
||||||
|
Warning 1329 No data to FETCH
|
||||||
drop procedure bug7743|
|
drop procedure bug7743|
|
||||||
drop table t4|
|
drop table t4|
|
||||||
delete from t3|
|
delete from t3|
|
||||||
|
@ -236,12 +236,16 @@ order by auto;
|
|||||||
# Test LIKE/NOT LIKE
|
# Test LIKE/NOT LIKE
|
||||||
select auto from t1 where
|
select auto from t1 where
|
||||||
string like "b%" and
|
string like "b%" and
|
||||||
vstring like "b%"
|
vstring like "b%" and
|
||||||
|
bin like concat(0xBB, '%') and
|
||||||
|
vbin like concat(0xBB, '%')
|
||||||
order by auto;
|
order by auto;
|
||||||
|
|
||||||
select auto from t1 where
|
select auto from t1 where
|
||||||
string not like "b%" and
|
string not like "b%" and
|
||||||
vstring not like "b%"
|
vstring not like "b%" and
|
||||||
|
bin not like concat(0xBB, '%') and
|
||||||
|
vbin not like concat(0xBB, '%')
|
||||||
order by auto;
|
order by auto;
|
||||||
|
|
||||||
# Various tests
|
# Various tests
|
||||||
@ -586,12 +590,16 @@ order by auto;
|
|||||||
# Test LIKE/NOT LIKE
|
# Test LIKE/NOT LIKE
|
||||||
select auto from t1 where
|
select auto from t1 where
|
||||||
string like "b%" and
|
string like "b%" and
|
||||||
vstring like "b%"
|
vstring like "b%" and
|
||||||
|
bin like concat(0xBB, '%') and
|
||||||
|
vbin like concat(0xBB, '%')
|
||||||
order by auto;
|
order by auto;
|
||||||
|
|
||||||
select auto from t1 where
|
select auto from t1 where
|
||||||
string not like "b%" and
|
string not like "b%" and
|
||||||
vstring not like "b%"
|
vstring not like "b%" and
|
||||||
|
bin not like concat(0xBB, '%') and
|
||||||
|
vbin not like concat(0xBB, '%')
|
||||||
order by auto;
|
order by auto;
|
||||||
|
|
||||||
# Various tests
|
# Various tests
|
||||||
|
@ -76,8 +76,10 @@ public:
|
|||||||
Uint32 m_attrSize; // element size (size when arraySize==1)
|
Uint32 m_attrSize; // element size (size when arraySize==1)
|
||||||
Uint32 m_arraySize; // length or length+2 for Var* types
|
Uint32 m_arraySize; // length or length+2 for Var* types
|
||||||
Uint32 m_keyInfoPos;
|
Uint32 m_keyInfoPos;
|
||||||
|
// TODO: use bits in attr desc 2
|
||||||
bool getInterpretableType() const ;
|
bool getInterpretableType() const ;
|
||||||
bool getCharType() const;
|
bool getCharType() const;
|
||||||
|
bool getStringType() const;
|
||||||
bool getBlobType() const;
|
bool getBlobType() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -468,6 +470,17 @@ NdbColumnImpl::getCharType() const {
|
|||||||
m_type == NdbDictionary::Column::Text ||
|
m_type == NdbDictionary::Column::Text ||
|
||||||
m_type == NdbDictionary::Column::Longvarchar);
|
m_type == NdbDictionary::Column::Longvarchar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
bool
|
||||||
|
NdbColumnImpl::getStringType() const {
|
||||||
|
return (m_type == NdbDictionary::Column::Char ||
|
||||||
|
m_type == NdbDictionary::Column::Varchar ||
|
||||||
|
m_type == NdbDictionary::Column::Longvarchar ||
|
||||||
|
m_type == NdbDictionary::Column::Binary ||
|
||||||
|
m_type == NdbDictionary::Column::Varbinary ||
|
||||||
|
m_type == NdbDictionary::Column::Longvarbinary);
|
||||||
|
}
|
||||||
|
|
||||||
inline
|
inline
|
||||||
bool
|
bool
|
||||||
|
@ -1014,8 +1014,14 @@ NdbOperation::branch_col(Uint32 type,
|
|||||||
Uint32 ColId, const void * val, Uint32 len,
|
Uint32 ColId, const void * val, Uint32 len,
|
||||||
bool nopad, Uint32 Label){
|
bool nopad, Uint32 Label){
|
||||||
|
|
||||||
|
DBUG_ENTER("NdbOperation::branch_col");
|
||||||
|
DBUG_PRINT("enter", ("type=%u col=%u val=0x%x len=%u label=%u",
|
||||||
|
type, ColId, val, len, Label));
|
||||||
|
if (val != NULL)
|
||||||
|
DBUG_DUMP("value", (char*)val, len);
|
||||||
|
|
||||||
if (initial_interpreterCheck() == -1)
|
if (initial_interpreterCheck() == -1)
|
||||||
return -1;
|
DBUG_RETURN(-1);
|
||||||
|
|
||||||
Interpreter::BinaryCondition c = (Interpreter::BinaryCondition)type;
|
Interpreter::BinaryCondition c = (Interpreter::BinaryCondition)type;
|
||||||
|
|
||||||
@ -1029,26 +1035,26 @@ NdbOperation::branch_col(Uint32 type,
|
|||||||
if (val == NULL)
|
if (val == NULL)
|
||||||
len = 0;
|
len = 0;
|
||||||
else {
|
else {
|
||||||
if (! col->getCharType()) {
|
if (! col->getStringType()) {
|
||||||
// prevent assert in NdbSqlUtil on length error
|
// prevent assert in NdbSqlUtil on length error
|
||||||
Uint32 sizeInBytes = col->m_attrSize * col->m_arraySize;
|
Uint32 sizeInBytes = col->m_attrSize * col->m_arraySize;
|
||||||
if (len != 0 && len != sizeInBytes)
|
if (len != 0 && len != sizeInBytes)
|
||||||
{
|
{
|
||||||
setErrorCodeAbort(4209);
|
setErrorCodeAbort(4209);
|
||||||
return -1;
|
DBUG_RETURN(-1);
|
||||||
}
|
}
|
||||||
len = sizeInBytes;
|
len = sizeInBytes;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (insertATTRINFO(Interpreter::BranchCol(c, 0, 0, false)) == -1)
|
if (insertATTRINFO(Interpreter::BranchCol(c, 0, 0, false)) == -1)
|
||||||
return -1;
|
DBUG_RETURN(-1);
|
||||||
|
|
||||||
if (insertBranch(Label) == -1)
|
if (insertBranch(Label) == -1)
|
||||||
return -1;
|
DBUG_RETURN(-1);
|
||||||
|
|
||||||
if (insertATTRINFO(Interpreter::BranchCol_2(ColId, len)))
|
if (insertATTRINFO(Interpreter::BranchCol_2(ColId, len)))
|
||||||
return -1;
|
DBUG_RETURN(-1);
|
||||||
|
|
||||||
Uint32 len2 = Interpreter::mod4(len);
|
Uint32 len2 = Interpreter::mod4(len);
|
||||||
if(len2 == len){
|
if(len2 == len){
|
||||||
@ -1065,7 +1071,7 @@ NdbOperation::branch_col(Uint32 type,
|
|||||||
}
|
}
|
||||||
|
|
||||||
theErrorLine++;
|
theErrorLine++;
|
||||||
return 0;
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -405,8 +405,8 @@ NdbScanFilterImpl::cond_col_const(Interpreter::BinaryCondition op,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
(m_operation->* branch)(AttrId, value, len, false, m_current.m_ownLabel);
|
int ret = (m_operation->* branch)(AttrId, value, len, false, m_current.m_ownLabel);
|
||||||
return 0;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -5697,8 +5697,11 @@ extern "C" pthread_handler_decl(ndb_util_thread_func,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Round tim e from millisceonds to seconds */
|
||||||
|
uint wait_secs= ((ndb_cache_check_time+999)/1000);
|
||||||
|
DBUG_PRINT("ndb_util_thread", ("wait_secs: %d", wait_secs));
|
||||||
/* Set new time to wake up */
|
/* Set new time to wake up */
|
||||||
set_timespec(abstime, ndb_cache_check_time);
|
set_timespec(abstime, wait_secs);
|
||||||
|
|
||||||
/* Lock mutex and fill list with pointers to all open tables */
|
/* Lock mutex and fill list with pointers to all open tables */
|
||||||
NDB_SHARE *share;
|
NDB_SHARE *share;
|
||||||
@ -5707,7 +5710,6 @@ extern "C" pthread_handler_decl(ndb_util_thread_func,
|
|||||||
{
|
{
|
||||||
share= (NDB_SHARE *)hash_element(&ndbcluster_open_tables, i);
|
share= (NDB_SHARE *)hash_element(&ndbcluster_open_tables, i);
|
||||||
share->use_count++; /* Make sure the table can't be closed */
|
share->use_count++; /* Make sure the table can't be closed */
|
||||||
|
|
||||||
DBUG_PRINT("ndb_util_thread",
|
DBUG_PRINT("ndb_util_thread",
|
||||||
("Found open table[%d]: %s, use_count: %d",
|
("Found open table[%d]: %s, use_count: %d",
|
||||||
i, share->table_name, share->use_count));
|
i, share->table_name, share->use_count));
|
||||||
@ -6620,7 +6622,9 @@ ha_ndbcluster::build_scan_filter_predicate(Ndb_cond * &cond,
|
|||||||
}
|
}
|
||||||
case(Item_func::LIKE_FUNC): {
|
case(Item_func::LIKE_FUNC): {
|
||||||
if (!value || !field) break;
|
if (!value || !field) break;
|
||||||
if (value->qualification.value_type != Item::STRING_ITEM) break;
|
if ((value->qualification.value_type != Item::STRING_ITEM) &&
|
||||||
|
(value->qualification.value_type != Item::VARBIN_ITEM))
|
||||||
|
break;
|
||||||
// Save value in right format for the field type
|
// Save value in right format for the field type
|
||||||
value->save_in_field(field);
|
value->save_in_field(field);
|
||||||
DBUG_PRINT("info", ("Generating LIKE filter: like(%d,%s,%d)",
|
DBUG_PRINT("info", ("Generating LIKE filter: like(%d,%s,%d)",
|
||||||
@ -6636,7 +6640,9 @@ ha_ndbcluster::build_scan_filter_predicate(Ndb_cond * &cond,
|
|||||||
}
|
}
|
||||||
case(Item_func::NOTLIKE_FUNC): {
|
case(Item_func::NOTLIKE_FUNC): {
|
||||||
if (!value || !field) break;
|
if (!value || !field) break;
|
||||||
if (value->qualification.value_type != Item::STRING_ITEM) break;
|
if ((value->qualification.value_type != Item::STRING_ITEM) &&
|
||||||
|
(value->qualification.value_type != Item::VARBIN_ITEM))
|
||||||
|
break;
|
||||||
// Save value in right format for the field type
|
// Save value in right format for the field type
|
||||||
value->save_in_field(field);
|
value->save_in_field(field);
|
||||||
DBUG_PRINT("info", ("Generating NOTLIKE filter: notlike(%d,%s,%d)",
|
DBUG_PRINT("info", ("Generating NOTLIKE filter: notlike(%d,%s,%d)",
|
||||||
|
@ -4691,10 +4691,9 @@ Disable with --skip-ndbcluster (will save memory).",
|
|||||||
(gptr*) &opt_ndb_optimized_node_selection,
|
(gptr*) &opt_ndb_optimized_node_selection,
|
||||||
0, GET_BOOL, OPT_ARG, 1, 0, 0, 0, 0, 0},
|
0, GET_BOOL, OPT_ARG, 1, 0, 0, 0, 0, 0},
|
||||||
{ "ndb-cache-check-time", OPT_NDB_CACHE_CHECK_TIME,
|
{ "ndb-cache-check-time", OPT_NDB_CACHE_CHECK_TIME,
|
||||||
"A dedicated thread is created to update cached commit count value"
|
"A dedicated thread is created to, at the given millisecons interval, invalidate the query cache if another MySQL server in the cluster has changed the data in the database.",
|
||||||
" at the given interval.",
|
(gptr*) &opt_ndb_cache_check_time, (gptr*) &opt_ndb_cache_check_time, 0, GET_ULONG, REQUIRED_ARG,
|
||||||
(gptr*) &opt_ndb_cache_check_time, (gptr*) &opt_ndb_cache_check_time,
|
0, 0, LONG_TIMEOUT, 0, 1, 0},
|
||||||
0, GET_ULONG, REQUIRED_ARG, 0, 0, LONG_TIMEOUT, 0, 1, 0},
|
|
||||||
#endif
|
#endif
|
||||||
{"new", 'n', "Use very new possible 'unsafe' functions.",
|
{"new", 'n', "Use very new possible 'unsafe' functions.",
|
||||||
(gptr*) &global_system_variables.new_mode,
|
(gptr*) &global_system_variables.new_mode,
|
||||||
|
@ -359,7 +359,9 @@ send_eof(THD *thd, bool no_flush)
|
|||||||
if (thd->client_capabilities & CLIENT_PROTOCOL_41)
|
if (thd->client_capabilities & CLIENT_PROTOCOL_41)
|
||||||
{
|
{
|
||||||
uchar buff[5];
|
uchar buff[5];
|
||||||
uint tmp= min(thd->total_warn_count, 65535);
|
/* Don't send warn count during SP execution, as the warn_list
|
||||||
|
is cleared between substatements, and mysqltest gets confused */
|
||||||
|
uint tmp= (thd->spcont ? 0 : min(thd->total_warn_count, 65535));
|
||||||
buff[0]=254;
|
buff[0]=254;
|
||||||
int2store(buff+1, tmp);
|
int2store(buff+1, tmp);
|
||||||
/*
|
/*
|
||||||
|
@ -19,9 +19,8 @@
|
|||||||
#pragma implementation // gcc: Class implementation
|
#pragma implementation // gcc: Class implementation
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <sys/stat.h>
|
|
||||||
|
|
||||||
#include "mysql_priv.h"
|
#include "mysql_priv.h"
|
||||||
|
#include <sys/stat.h>
|
||||||
#ifdef HAVE_SYS_MMAN_H
|
#ifdef HAVE_SYS_MMAN_H
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -4189,6 +4189,12 @@ unsent_create_error:
|
|||||||
thd->row_count_func= 0;
|
thd->row_count_func= 0;
|
||||||
res= sp->execute_procedure(thd, &lex->value_list);
|
res= sp->execute_procedure(thd, &lex->value_list);
|
||||||
|
|
||||||
|
/* If warnings have been cleared, we have to clear total_warn_count
|
||||||
|
* too, otherwise the clients get confused.
|
||||||
|
*/
|
||||||
|
if (thd->warn_list.is_empty())
|
||||||
|
thd->total_warn_count= 0;
|
||||||
|
|
||||||
thd->variables.select_limit= select_limit;
|
thd->variables.select_limit= select_limit;
|
||||||
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||||
sp_restore_security_context(thd, sp, &save_ctx);
|
sp_restore_security_context(thd, sp, &save_ctx);
|
||||||
|
@ -11418,8 +11418,8 @@ find_order_in_list(THD *thd, Item **ref_pointer_array, TABLE_LIST *tables,
|
|||||||
in is field of view table => check that references on translation
|
in is field of view table => check that references on translation
|
||||||
table are same
|
table are same
|
||||||
*/
|
*/
|
||||||
((*select_item)->type() == Item::Item::REF_ITEM &&
|
((*select_item)->type() == Item::REF_ITEM &&
|
||||||
view_ref->type() == Item::Item::REF_ITEM &&
|
view_ref->type() == Item::REF_ITEM &&
|
||||||
((Item_ref *) (*select_item))->ref ==
|
((Item_ref *) (*select_item))->ref ==
|
||||||
((Item_ref *) view_ref)->ref)))
|
((Item_ref *) view_ref)->ref)))
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user