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
e0ef9964
Commit
e0ef9964
authored
Apr 21, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/M50/mysql-5.0
parents
9c76da11
ae076381
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
163 additions
and
68 deletions
+163
-68
mysql-test/mysql-test-run.sh
mysql-test/mysql-test-run.sh
+3
-1
mysql-test/r/func_gconcat.result
mysql-test/r/func_gconcat.result
+0
-10
mysql-test/r/ndb_bitfield.result
mysql-test/r/ndb_bitfield.result
+2
-2
mysql-test/r/rpl_deadlock.result
mysql-test/r/rpl_deadlock.result
+99
-6
mysql-test/t/func_gconcat.test
mysql-test/t/func_gconcat.test
+0
-11
mysql-test/t/rpl_deadlock.test
mysql-test/t/rpl_deadlock.test
+7
-1
ndb/include/kernel/signaldata/TupFrag.hpp
ndb/include/kernel/signaldata/TupFrag.hpp
+2
-1
ndb/include/util/NdbSqlUtil.hpp
ndb/include/util/NdbSqlUtil.hpp
+3
-3
ndb/src/common/util/NdbSqlUtil.cpp
ndb/src/common/util/NdbSqlUtil.cpp
+28
-24
ndb/src/kernel/blocks/dbtux/DbtuxMeta.cpp
ndb/src/kernel/blocks/dbtux/DbtuxMeta.cpp
+3
-2
ndb/src/ndbapi/NdbDictionaryImpl.cpp
ndb/src/ndbapi/NdbDictionaryImpl.cpp
+11
-7
ndb/src/ndbapi/NdbScanOperation.cpp
ndb/src/ndbapi/NdbScanOperation.cpp
+5
-0
No files found.
mysql-test/mysql-test-run.sh
View file @
e0ef9964
...
@@ -631,7 +631,9 @@ fi
...
@@ -631,7 +631,9 @@ fi
[
-d
$MYSQL_TEST_DIR
/var/tmp
]
||
mkdir
$MYSQL_TEST_DIR
/var/tmp
[
-d
$MYSQL_TEST_DIR
/var/tmp
]
||
mkdir
$MYSQL_TEST_DIR
/var/tmp
[
-d
$MYSQL_TEST_DIR
/var/run
]
||
mkdir
$MYSQL_TEST_DIR
/var/run
[
-d
$MYSQL_TEST_DIR
/var/run
]
||
mkdir
$MYSQL_TEST_DIR
/var/run
[
-d
$MYSQL_TEST_DIR
/var/log
]
||
mkdir
$MYSQL_TEST_DIR
/var/log
[
-d
$MYSQL_TEST_DIR
/var/log
]
||
mkdir
$MYSQL_TEST_DIR
/var/log
if
!
test
-L
$MYSQL_TEST_DIR
/var/std_data_ln
;
then
# Use 'test', not '[' as the shell builtin might not have '-L
if
test
!
-L
"
$MYSQL_TEST_DIR
/var/std_data_ln"
;
then
ln
-s
$MYSQL_TEST_DIR
/std_data/
$MYSQL_TEST_DIR
/var/std_data_ln
ln
-s
$MYSQL_TEST_DIR
/std_data/
$MYSQL_TEST_DIR
/var/std_data_ln
fi
fi
...
...
mysql-test/r/func_gconcat.result
View file @
e0ef9964
...
@@ -611,16 +611,6 @@ count(distinct (f1+1))
...
@@ -611,16 +611,6 @@ count(distinct (f1+1))
1
1
3
3
drop table t1;
drop table t1;
create table t1 (f1 int unsigned, f2 varchar(255));
insert into t1 values (1,repeat('a',255)),(2,repeat('b',255));
select f2,group_concat(f1) from t1 group by f2;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def test t1 t1 f2 f2 253 255 255 Y 0 0 8
def group_concat(f1) 253 400 1 Y 128 0 63
f2 group_concat(f1)
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 1
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 2
drop table t1;
set names latin1;
set names latin1;
create table t1 (a char, b char);
create table t1 (a char, b char);
insert into t1 values ('a', 'a'), ('a', 'b'), ('b', 'a'), ('b', 'b');
insert into t1 values ('a', 'a'), ('a', 'b'), ('b', 'a'), ('b', 'b');
...
...
mysql-test/r/ndb_bitfield.result
View file @
e0ef9964
...
@@ -201,13 +201,13 @@ create table t1 (
...
@@ -201,13 +201,13 @@ create table t1 (
pk1 bit(9) not null primary key,
pk1 bit(9) not null primary key,
b int
b int
) engine=ndbcluster;
) engine=ndbcluster;
ERROR HY000: Can't create table './test/t1.frm' (errno:
739
)
ERROR HY000: Can't create table './test/t1.frm' (errno:
906
)
create table t1 (
create table t1 (
pk1 int not null primary key,
pk1 int not null primary key,
b bit(9),
b bit(9),
key(b)
key(b)
) engine=ndbcluster;
) engine=ndbcluster;
ERROR HY000: Can't create table './test/t1.frm' (errno:
743
)
ERROR HY000: Can't create table './test/t1.frm' (errno:
906
)
create table t1 (
create table t1 (
pk1 int primary key,
pk1 int primary key,
b bit(32) not null
b bit(32) not null
...
...
mysql-test/r/rpl_deadlock.result
View file @
e0ef9964
...
@@ -44,8 +44,39 @@ select * from t2;
...
@@ -44,8 +44,39 @@ select * from t2;
a
a
22
22
show slave status;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Slave_IO_State #
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 18911 # # master-bin.000001 Yes Yes 0 0 18911 # None 0 No #
Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_MYPORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 18911
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
Slave_IO_Running Yes
Slave_SQL_Running Yes
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 18911
Relay_Log_Space #
Until_Condition None
Until_Log_File
Until_Log_Pos 0
Master_SSL_Allowed No
Master_SSL_CA_File
Master_SSL_CA_Path
Master_SSL_Cert
Master_SSL_Cipher
Master_SSL_Key
Seconds_Behind_Master #
stop slave;
stop slave;
change master to master_log_pos=532;
change master to master_log_pos=532;
begin;
begin;
...
@@ -62,8 +93,39 @@ select * from t2;
...
@@ -62,8 +93,39 @@ select * from t2;
a
a
22
22
show slave status;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Slave_IO_State #
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 18911 # # master-bin.000001 Yes Yes 0 0 18911 # None 0 No #
Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_MYPORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 18911
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
Slave_IO_Running #
Slave_SQL_Running Yes
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 18911
Relay_Log_Space #
Until_Condition None
Until_Log_File
Until_Log_Pos 0
Master_SSL_Allowed No
Master_SSL_CA_File
Master_SSL_CA_Path
Master_SSL_Cert
Master_SSL_Cipher
Master_SSL_Key
Seconds_Behind_Master #
set global max_relay_log_size=0;
set global max_relay_log_size=0;
stop slave;
stop slave;
change master to master_log_pos=532;
change master to master_log_pos=532;
...
@@ -82,6 +144,37 @@ select * from t2;
...
@@ -82,6 +144,37 @@ select * from t2;
a
a
22
22
show slave status;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Slave_IO_State #
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 18911 # # master-bin.000001 # Yes 0 0 18911 # None 0 No #
Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_MYPORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 18911
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
Slave_IO_Running #
Slave_SQL_Running Yes
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 18911
Relay_Log_Space #
Until_Condition None
Until_Log_File
Until_Log_Pos 0
Master_SSL_Allowed No
Master_SSL_CA_File
Master_SSL_CA_Path
Master_SSL_Cert
Master_SSL_Cipher
Master_SSL_Key
Seconds_Behind_Master #
drop table t1,t2,t3,t4;
drop table t1,t2,t3,t4;
mysql-test/t/func_gconcat.test
View file @
e0ef9964
...
@@ -398,17 +398,6 @@ select f1, group_concat(f1+1) from t1 group by f1 with rollup;
...
@@ -398,17 +398,6 @@ select f1, group_concat(f1+1) from t1 group by f1 with rollup;
select
count
(
distinct
(
f1
+
1
))
from
t1
group
by
f1
with
rollup
;
select
count
(
distinct
(
f1
+
1
))
from
t1
group
by
f1
with
rollup
;
drop
table
t1
;
drop
table
t1
;
#
# Bug#14169 type of group_concat() result changed to blob if tmp_table was used
#
create
table
t1
(
f1
int
unsigned
,
f2
varchar
(
255
));
insert
into
t1
values
(
1
,
repeat
(
'a'
,
255
)),(
2
,
repeat
(
'b'
,
255
));
--
enable_metadata
select
f2
,
group_concat
(
f1
)
from
t1
group
by
f2
;
# select f2,group_concat(f1) from t1 group by f2 order by 2;
--
disable_metadata
drop
table
t1
;
# End of 4.1 tests
# End of 4.1 tests
#
#
...
...
mysql-test/t/rpl_deadlock.test
View file @
e0ef9964
...
@@ -67,7 +67,9 @@ select * from t2;
...
@@ -67,7 +67,9 @@ select * from t2;
# check that no error is reported
# check that no error is reported
--
replace_column
1
# 8 # 9 # 23 # 33 #
--
replace_column
1
# 8 # 9 # 23 # 33 #
--
replace_result
$MASTER_MYPORT
MASTER_MYPORT
--
replace_result
$MASTER_MYPORT
MASTER_MYPORT
--
vertical_results
show
slave
status
;
show
slave
status
;
--
horizontal_results
# 2) Test lock wait timeout
# 2) Test lock wait timeout
...
@@ -82,9 +84,11 @@ sync_with_master;
...
@@ -82,9 +84,11 @@ sync_with_master;
select
*
from
t1
;
# check that slave succeeded finally
select
*
from
t1
;
# check that slave succeeded finally
select
*
from
t2
;
select
*
from
t2
;
# check that no error is reported
# check that no error is reported
--
replace_column
1
# 8 # 9 # 23 # 33 #
--
replace_column
1
# 8 # 9 #
11 #
23 # 33 #
--
replace_result
$MASTER_MYPORT
MASTER_MYPORT
--
replace_result
$MASTER_MYPORT
MASTER_MYPORT
--
vertical_results
show
slave
status
;
show
slave
status
;
--
horizontal_results
# Now we repeat 2), but with BEGIN in the same relay log as
# Now we repeat 2), but with BEGIN in the same relay log as
# COMMIT (to see if seeking into hot log is ok).
# COMMIT (to see if seeking into hot log is ok).
...
@@ -104,7 +108,9 @@ select * from t1;
...
@@ -104,7 +108,9 @@ select * from t1;
select
*
from
t2
;
select
*
from
t2
;
--
replace_column
1
# 8 # 9 # 11 # 23 # 33 #
--
replace_column
1
# 8 # 9 # 11 # 23 # 33 #
--
replace_result
$MASTER_MYPORT
MASTER_MYPORT
--
replace_result
$MASTER_MYPORT
MASTER_MYPORT
--
vertical_results
show
slave
status
;
show
slave
status
;
--
horizontal_results
connection
master
;
connection
master
;
drop
table
t1
,
t2
,
t3
,
t4
;
drop
table
t1
,
t2
,
t3
,
t4
;
...
...
ndb/include/kernel/signaldata/TupFrag.hpp
View file @
e0ef9964
...
@@ -146,7 +146,8 @@ public:
...
@@ -146,7 +146,8 @@ public:
enum
ErrorCode
{
enum
ErrorCode
{
NoError
=
0
,
NoError
=
0
,
InvalidCharset
=
743
,
InvalidCharset
=
743
,
TooManyBitsUsed
=
831
TooManyBitsUsed
=
831
,
UnsupportedType
=
906
};
};
private:
private:
Uint32
userPtr
;
Uint32
userPtr
;
...
...
ndb/include/util/NdbSqlUtil.hpp
View file @
e0ef9964
...
@@ -117,9 +117,9 @@ public:
...
@@ -117,9 +117,9 @@ public:
/**
/**
* Check character set.
* Check character set.
*/
*/
static
bool
usable_in
_pk
(
Uint32
typeId
,
const
void
*
info
);
static
uint
check_column_for
_pk
(
Uint32
typeId
,
const
void
*
info
);
static
bool
usable_in
_hash_index
(
Uint32
typeId
,
const
void
*
info
);
static
uint
check_column_for
_hash_index
(
Uint32
typeId
,
const
void
*
info
);
static
bool
usable_in
_ordered_index
(
Uint32
typeId
,
const
void
*
info
);
static
uint
check_column_for
_ordered_index
(
Uint32
typeId
,
const
void
*
info
);
/**
/**
* Get number of length bytes and length from variable length string.
* Get number of length bytes and length from variable length string.
...
...
ndb/src/common/util/NdbSqlUtil.cpp
View file @
e0ef9964
...
@@ -872,8 +872,8 @@ NdbSqlUtil::likeLongvarbinary(const void* info, const void* p1, unsigned n1, con
...
@@ -872,8 +872,8 @@ NdbSqlUtil::likeLongvarbinary(const void* info, const void* p1, unsigned n1, con
// check charset
// check charset
bool
uint
NdbSqlUtil
::
usable_in
_pk
(
Uint32
typeId
,
const
void
*
info
)
NdbSqlUtil
::
check_column_for
_pk
(
Uint32
typeId
,
const
void
*
info
)
{
{
const
Type
&
type
=
getType
(
typeId
);
const
Type
&
type
=
getType
(
typeId
);
switch
(
type
.
m_typeId
)
{
switch
(
type
.
m_typeId
)
{
...
@@ -882,12 +882,14 @@ NdbSqlUtil::usable_in_pk(Uint32 typeId, const void* info)
...
@@ -882,12 +882,14 @@ NdbSqlUtil::usable_in_pk(Uint32 typeId, const void* info)
case
Type
:
:
Longvarchar
:
case
Type
:
:
Longvarchar
:
{
{
const
CHARSET_INFO
*
cs
=
(
const
CHARSET_INFO
*
)
info
;
const
CHARSET_INFO
*
cs
=
(
const
CHARSET_INFO
*
)
info
;
return
if
(
cs
!=
0
&&
cs
!=
0
&&
cs
->
cset
!=
0
&&
cs
->
cset
!=
0
&&
cs
->
coll
!=
0
&&
cs
->
coll
!=
0
&&
cs
->
coll
->
strnxfrm
!=
0
&&
cs
->
coll
->
strnxfrm
!=
0
&&
cs
->
strxfrm_multiply
<=
MAX_XFRM_MULTIPLY
)
cs
->
strxfrm_multiply
<=
MAX_XFRM_MULTIPLY
;
return
0
;
else
return
743
;
}
}
break
;
break
;
case
Type
:
:
Undefined
:
case
Type
:
:
Undefined
:
...
@@ -896,19 +898,19 @@ NdbSqlUtil::usable_in_pk(Uint32 typeId, const void* info)
...
@@ -896,19 +898,19 @@ NdbSqlUtil::usable_in_pk(Uint32 typeId, const void* info)
case
Type
:
:
Bit
:
case
Type
:
:
Bit
:
break
;
break
;
default:
default:
return
true
;
return
0
;
}
}
return
false
;
return
906
;
}
}
bool
uint
NdbSqlUtil
::
usable_in
_hash_index
(
Uint32
typeId
,
const
void
*
info
)
NdbSqlUtil
::
check_column_for
_hash_index
(
Uint32
typeId
,
const
void
*
info
)
{
{
return
usable_in
_pk
(
typeId
,
info
);
return
check_column_for
_pk
(
typeId
,
info
);
}
}
bool
uint
NdbSqlUtil
::
usable_in
_ordered_index
(
Uint32
typeId
,
const
void
*
info
)
NdbSqlUtil
::
check_column_for
_ordered_index
(
Uint32
typeId
,
const
void
*
info
)
{
{
const
Type
&
type
=
getType
(
typeId
);
const
Type
&
type
=
getType
(
typeId
);
if
(
type
.
m_cmp
==
NULL
)
if
(
type
.
m_cmp
==
NULL
)
...
@@ -919,13 +921,15 @@ NdbSqlUtil::usable_in_ordered_index(Uint32 typeId, const void* info)
...
@@ -919,13 +921,15 @@ NdbSqlUtil::usable_in_ordered_index(Uint32 typeId, const void* info)
case
Type
:
:
Longvarchar
:
case
Type
:
:
Longvarchar
:
{
{
const
CHARSET_INFO
*
cs
=
(
const
CHARSET_INFO
*
)
info
;
const
CHARSET_INFO
*
cs
=
(
const
CHARSET_INFO
*
)
info
;
return
if
(
cs
!=
0
&&
cs
!=
0
&&
cs
->
cset
!=
0
&&
cs
->
cset
!=
0
&&
cs
->
coll
!=
0
&&
cs
->
coll
!=
0
&&
cs
->
coll
->
strnxfrm
!=
0
&&
cs
->
coll
->
strnxfrm
!=
0
&&
cs
->
coll
->
strnncollsp
!=
0
&&
cs
->
coll
->
strnncollsp
!=
0
&&
cs
->
strxfrm_multiply
<=
MAX_XFRM_MULTIPLY
)
cs
->
strxfrm_multiply
<=
MAX_XFRM_MULTIPLY
;
return
0
;
else
return
743
;
}
}
break
;
break
;
case
Type
:
:
Undefined
:
case
Type
:
:
Undefined
:
...
@@ -934,9 +938,9 @@ NdbSqlUtil::usable_in_ordered_index(Uint32 typeId, const void* info)
...
@@ -934,9 +938,9 @@ NdbSqlUtil::usable_in_ordered_index(Uint32 typeId, const void* info)
case
Type
:
:
Bit
:
// can be fixed
case
Type
:
:
Bit
:
// can be fixed
break
;
break
;
default:
default:
return
true
;
return
0
;
}
}
return
false
;
return
906
;
}
}
// utilities
// utilities
...
...
ndb/src/kernel/blocks/dbtux/DbtuxMeta.cpp
View file @
e0ef9964
...
@@ -217,11 +217,12 @@ Dbtux::execTUX_ADD_ATTRREQ(Signal* signal)
...
@@ -217,11 +217,12 @@ Dbtux::execTUX_ADD_ATTRREQ(Signal* signal)
break
;
break
;
}
}
if
(
descAttr
.
m_charset
!=
0
)
{
if
(
descAttr
.
m_charset
!=
0
)
{
uint
err
;
CHARSET_INFO
*
cs
=
all_charsets
[
descAttr
.
m_charset
];
CHARSET_INFO
*
cs
=
all_charsets
[
descAttr
.
m_charset
];
ndbrequire
(
cs
!=
0
);
ndbrequire
(
cs
!=
0
);
if
(
!
NdbSqlUtil
::
usable_in_ordered_index
(
descAttr
.
m_typeId
,
cs
))
{
if
(
(
err
=
NdbSqlUtil
::
check_column_for_ordered_index
(
descAttr
.
m_typeId
,
cs
)
))
{
jam
();
jam
();
errorCode
=
TuxAddAttrRef
::
InvalidCharset
;
errorCode
=
(
TuxAddAttrRef
::
ErrorCode
)
err
;
break
;
break
;
}
}
}
}
...
...
ndb/src/ndbapi/NdbDictionaryImpl.cpp
View file @
e0ef9964
...
@@ -1573,7 +1573,7 @@ NdbDictInterface::createOrAlterTable(Ndb & ndb,
...
@@ -1573,7 +1573,7 @@ NdbDictInterface::createOrAlterTable(Ndb & ndb,
bool
alter
)
bool
alter
)
{
{
DBUG_ENTER
(
"NdbDictInterface::createOrAlterTable"
);
DBUG_ENTER
(
"NdbDictInterface::createOrAlterTable"
);
unsigned
i
;
unsigned
i
,
err
;
if
((
unsigned
)
impl
.
getNoOfPrimaryKeys
()
>
NDB_MAX_NO_OF_ATTRIBUTES_IN_KEY
){
if
((
unsigned
)
impl
.
getNoOfPrimaryKeys
()
>
NDB_MAX_NO_OF_ATTRIBUTES_IN_KEY
){
m_error
.
code
=
4317
;
m_error
.
code
=
4317
;
DBUG_RETURN
(
-
1
);
DBUG_RETURN
(
-
1
);
...
@@ -1683,8 +1683,10 @@ NdbDictInterface::createOrAlterTable(Ndb & ndb,
...
@@ -1683,8 +1683,10 @@ NdbDictInterface::createOrAlterTable(Ndb & ndb,
DBUG_RETURN
(
-
1
);
DBUG_RETURN
(
-
1
);
}
}
// primary key type check
// primary key type check
if
(
col
->
m_pk
&&
!
NdbSqlUtil
::
usable_in_pk
(
col
->
m_type
,
col
->
m_cs
))
{
if
(
col
->
m_pk
&&
m_error
.
code
=
(
col
->
m_cs
!=
0
?
743
:
739
);
(
err
=
NdbSqlUtil
::
check_column_for_pk
(
col
->
m_type
,
col
->
m_cs
)))
{
m_error
.
code
=
err
;
DBUG_RETURN
(
-
1
);
DBUG_RETURN
(
-
1
);
}
}
// distribution key not supported for Char attribute
// distribution key not supported for Char attribute
...
@@ -2157,7 +2159,7 @@ NdbDictInterface::createIndex(Ndb & ndb,
...
@@ -2157,7 +2159,7 @@ NdbDictInterface::createIndex(Ndb & ndb,
{
{
//validate();
//validate();
//aggregate();
//aggregate();
unsigned
i
;
unsigned
i
,
err
;
UtilBufferWriter
w
(
m_buffer
);
UtilBufferWriter
w
(
m_buffer
);
const
size_t
len
=
strlen
(
impl
.
m_externalName
.
c_str
())
+
1
;
const
size_t
len
=
strlen
(
impl
.
m_externalName
.
c_str
())
+
1
;
if
(
len
>
MAX_TAB_NAME_SIZE
)
{
if
(
len
>
MAX_TAB_NAME_SIZE
)
{
...
@@ -2208,10 +2210,12 @@ NdbDictInterface::createIndex(Ndb & ndb,
...
@@ -2208,10 +2210,12 @@ NdbDictInterface::createIndex(Ndb & ndb,
// index key type check
// index key type check
if
(
it
==
DictTabInfo
::
UniqueHashIndex
&&
if
(
it
==
DictTabInfo
::
UniqueHashIndex
&&
!
NdbSqlUtil
::
usable_in_hash_index
(
col
->
m_type
,
col
->
m_cs
)
||
(
err
=
NdbSqlUtil
::
check_column_for_hash_index
(
col
->
m_type
,
col
->
m_cs
))
||
it
==
DictTabInfo
::
OrderedIndex
&&
it
==
DictTabInfo
::
OrderedIndex
&&
!
NdbSqlUtil
::
usable_in_ordered_index
(
col
->
m_type
,
col
->
m_cs
))
{
(
err
=
NdbSqlUtil
::
check_column_for_ordered_index
(
col
->
m_type
,
col
->
m_cs
)))
m_error
.
code
=
743
;
{
m_error
.
code
=
err
;
return
-
1
;
return
-
1
;
}
}
attributeList
.
id
[
i
]
=
col
->
m_attrId
;
attributeList
.
id
[
i
]
=
col
->
m_attrId
;
...
...
ndb/src/ndbapi/NdbScanOperation.cpp
View file @
e0ef9964
...
@@ -1086,6 +1086,11 @@ int
...
@@ -1086,6 +1086,11 @@ int
NdbIndexScanOperation
::
setBound
(
const
NdbColumnImpl
*
tAttrInfo
,
NdbIndexScanOperation
::
setBound
(
const
NdbColumnImpl
*
tAttrInfo
,
int
type
,
const
void
*
aValue
,
Uint32
len
)
int
type
,
const
void
*
aValue
,
Uint32
len
)
{
{
if
(
!
tAttrInfo
)
{
setErrorCodeAbort
(
4318
);
// Invalid attribute
return
-
1
;
}
if
(
theOperationType
==
OpenRangeScanRequest
&&
if
(
theOperationType
==
OpenRangeScanRequest
&&
(
0
<=
type
&&
type
<=
4
)
&&
(
0
<=
type
&&
type
<=
4
)
&&
len
<=
8000
)
{
len
<=
8000
)
{
...
...
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