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
8f957a80
Commit
8f957a80
authored
Apr 21, 2006
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-new
parents
8f9cc678
7a746d59
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
57 additions
and
48 deletions
+57
-48
mysql-test/r/ndb_bitfield.result
mysql-test/r/ndb_bitfield.result
+6
-6
storage/myisam/mi_open.c
storage/myisam/mi_open.c
+1
-1
storage/ndb/include/kernel/signaldata/TupFrag.hpp
storage/ndb/include/kernel/signaldata/TupFrag.hpp
+2
-1
storage/ndb/include/util/NdbSqlUtil.hpp
storage/ndb/include/util/NdbSqlUtil.hpp
+3
-3
storage/ndb/src/common/util/NdbSqlUtil.cpp
storage/ndb/src/common/util/NdbSqlUtil.cpp
+28
-24
storage/ndb/src/kernel/blocks/dbtux/DbtuxMeta.cpp
storage/ndb/src/kernel/blocks/dbtux/DbtuxMeta.cpp
+3
-2
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
+11
-7
unittest/examples/Makefile.am
unittest/examples/Makefile.am
+2
-2
unittest/mytap/t/Makefile.am
unittest/mytap/t/Makefile.am
+1
-2
No files found.
mysql-test/r/ndb_bitfield.result
View file @
8f957a80
...
...
@@ -201,21 +201,21 @@ create table t1 (
pk1 bit(9) not null primary key,
b int
) engine=ndbcluster;
ERROR HY000: Can't create table 'test.t1' (errno:
140
)
ERROR HY000: Can't create table 'test.t1' (errno:
906
)
show warnings;
Level Code Message
Error 1296 Got error
739 'Unsupported primary key length
' from NDB
Error 1005 Can't create table 'test.t1' (errno:
140
)
Error 1296 Got error
906 'Unsupported attribute type in index
' from NDB
Error 1005 Can't create table 'test.t1' (errno:
906
)
create table t1 (
pk1 int not null primary key,
b bit(9),
key(b)
) engine=ndbcluster;
ERROR HY000: Can't create table 'test.t1' (errno:
140
)
ERROR HY000: Can't create table 'test.t1' (errno:
906
)
show warnings;
Level Code Message
Error 1296 Got error
743 'Unsupported character set in table or
index' from NDB
Error 1005 Can't create table 'test.t1' (errno:
140
)
Error 1296 Got error
906 'Unsupported attribute type in
index' from NDB
Error 1005 Can't create table 'test.t1' (errno:
906
)
create table t1 (
pk1 int primary key,
b bit(32) not null
...
...
storage/myisam/mi_open.c
View file @
8f957a80
...
...
@@ -96,7 +96,7 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
bzero
((
byte
*
)
&
info
,
sizeof
(
info
));
my_realpath
(
name_buff
,
fn_format
(
org_name
,
name
,
""
,
MI_NAME_IEXT
,
MY_UNPACK_FILENAME
|
MY_APPEND_EXT
),
MYF
(
0
));
MY_UNPACK_FILENAME
),
MYF
(
0
));
pthread_mutex_lock
(
&
THR_LOCK_myisam
);
if
(
!
(
old_info
=
test_if_reopen
(
name_buff
)))
{
...
...
storage/ndb/include/kernel/signaldata/TupFrag.hpp
View file @
8f957a80
...
...
@@ -147,7 +147,8 @@ public:
enum
ErrorCode
{
NoError
=
0
,
InvalidCharset
=
743
,
TooManyBitsUsed
=
831
TooManyBitsUsed
=
831
,
UnsupportedType
=
906
};
private:
Uint32
userPtr
;
...
...
storage/ndb/include/util/NdbSqlUtil.hpp
View file @
8f957a80
...
...
@@ -117,9 +117,9 @@ public:
/**
* Check character set.
*/
static
bool
usable_in
_pk
(
Uint32
typeId
,
const
void
*
info
);
static
bool
usable_in
_hash_index
(
Uint32
typeId
,
const
void
*
info
);
static
bool
usable_in
_ordered_index
(
Uint32
typeId
,
const
void
*
info
);
static
uint
check_column_for
_pk
(
Uint32
typeId
,
const
void
*
info
);
static
uint
check_column_for
_hash_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.
...
...
storage/ndb/src/common/util/NdbSqlUtil.cpp
View file @
8f957a80
...
...
@@ -872,8 +872,8 @@ NdbSqlUtil::likeLongvarbinary(const void* info, const void* p1, unsigned n1, con
// check charset
bool
NdbSqlUtil
::
usable_in
_pk
(
Uint32
typeId
,
const
void
*
info
)
uint
NdbSqlUtil
::
check_column_for
_pk
(
Uint32
typeId
,
const
void
*
info
)
{
const
Type
&
type
=
getType
(
typeId
);
switch
(
type
.
m_typeId
)
{
...
...
@@ -882,12 +882,14 @@ NdbSqlUtil::usable_in_pk(Uint32 typeId, const void* info)
case
Type
:
:
Longvarchar
:
{
const
CHARSET_INFO
*
cs
=
(
const
CHARSET_INFO
*
)
info
;
return
cs
!=
0
&&
cs
->
cset
!=
0
&&
cs
->
coll
!=
0
&&
cs
->
coll
->
strnxfrm
!=
0
&&
cs
->
strxfrm_multiply
<=
MAX_XFRM_MULTIPLY
;
if
(
cs
!=
0
&&
cs
->
cset
!=
0
&&
cs
->
coll
!=
0
&&
cs
->
coll
->
strnxfrm
!=
0
&&
cs
->
strxfrm_multiply
<=
MAX_XFRM_MULTIPLY
)
return
0
;
else
return
743
;
}
break
;
case
Type
:
:
Undefined
:
...
...
@@ -896,19 +898,19 @@ NdbSqlUtil::usable_in_pk(Uint32 typeId, const void* info)
case
Type
:
:
Bit
:
break
;
default:
return
true
;
return
0
;
}
return
false
;
return
906
;
}
bool
NdbSqlUtil
::
usable_in
_hash_index
(
Uint32
typeId
,
const
void
*
info
)
uint
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
NdbSqlUtil
::
usable_in
_ordered_index
(
Uint32
typeId
,
const
void
*
info
)
uint
NdbSqlUtil
::
check_column_for
_ordered_index
(
Uint32
typeId
,
const
void
*
info
)
{
const
Type
&
type
=
getType
(
typeId
);
if
(
type
.
m_cmp
==
NULL
)
...
...
@@ -919,13 +921,15 @@ NdbSqlUtil::usable_in_ordered_index(Uint32 typeId, const void* info)
case
Type
:
:
Longvarchar
:
{
const
CHARSET_INFO
*
cs
=
(
const
CHARSET_INFO
*
)
info
;
return
cs
!=
0
&&
cs
->
cset
!=
0
&&
cs
->
coll
!=
0
&&
cs
->
coll
->
strnxfrm
!=
0
&&
cs
->
coll
->
strnncollsp
!=
0
&&
cs
->
strxfrm_multiply
<=
MAX_XFRM_MULTIPLY
;
if
(
cs
!=
0
&&
cs
->
cset
!=
0
&&
cs
->
coll
!=
0
&&
cs
->
coll
->
strnxfrm
!=
0
&&
cs
->
coll
->
strnncollsp
!=
0
&&
cs
->
strxfrm_multiply
<=
MAX_XFRM_MULTIPLY
)
return
0
;
else
return
743
;
}
break
;
case
Type
:
:
Undefined
:
...
...
@@ -934,9 +938,9 @@ NdbSqlUtil::usable_in_ordered_index(Uint32 typeId, const void* info)
case
Type
:
:
Bit
:
// can be fixed
break
;
default:
return
true
;
return
0
;
}
return
false
;
return
906
;
}
// utilities
...
...
storage/ndb/src/kernel/blocks/dbtux/DbtuxMeta.cpp
View file @
8f957a80
...
...
@@ -215,11 +215,12 @@ Dbtux::execTUX_ADD_ATTRREQ(Signal* signal)
break
;
}
if
(
descAttr
.
m_charset
!=
0
)
{
uint
err
;
CHARSET_INFO
*
cs
=
all_charsets
[
descAttr
.
m_charset
];
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
();
errorCode
=
TuxAddAttrRef
::
InvalidCharset
;
errorCode
=
(
TuxAddAttrRef
::
ErrorCode
)
err
;
break
;
}
}
...
...
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
View file @
8f957a80
...
...
@@ -2301,7 +2301,7 @@ NdbDictInterface::createOrAlterTable(Ndb & ndb,
NdbTableImpl
&
impl
,
bool
alter
)
{
unsigned
i
;
unsigned
i
,
err
;
char
*
ts_names
[
MAX_NDB_PARTITIONS
];
DBUG_ENTER
(
"NdbDictInterface::createOrAlterTable"
);
...
...
@@ -2602,8 +2602,10 @@ NdbDictInterface::createOrAlterTable(Ndb & ndb,
DBUG_RETURN
(
-
1
);
}
// primary key type check
if
(
col
->
m_pk
&&
!
NdbSqlUtil
::
usable_in_pk
(
col
->
m_type
,
col
->
m_cs
))
{
m_error
.
code
=
(
col
->
m_cs
!=
0
?
743
:
739
);
if
(
col
->
m_pk
&&
(
err
=
NdbSqlUtil
::
check_column_for_pk
(
col
->
m_type
,
col
->
m_cs
)))
{
m_error
.
code
=
err
;
DBUG_RETURN
(
-
1
);
}
// distribution key not supported for Char attribute
...
...
@@ -3034,7 +3036,7 @@ NdbDictInterface::createIndex(Ndb & ndb,
{
//validate();
//aggregate();
unsigned
i
;
unsigned
i
,
err
;
UtilBufferWriter
w
(
m_buffer
);
const
size_t
len
=
strlen
(
impl
.
m_externalName
.
c_str
())
+
1
;
if
(
len
>
MAX_TAB_NAME_SIZE
)
{
...
...
@@ -3083,10 +3085,12 @@ NdbDictInterface::createIndex(Ndb & ndb,
// index key type check
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
&&
!
NdbSqlUtil
::
usable_in_ordered_index
(
col
->
m_type
,
col
->
m_cs
))
{
m_error
.
code
=
743
;
(
err
=
NdbSqlUtil
::
check_column_for_ordered_index
(
col
->
m_type
,
col
->
m_cs
)))
{
m_error
.
code
=
err
;
return
-
1
;
}
// API uses external column number to talk to DICT
...
...
unittest/examples/Makefile.am
View file @
8f957a80
AM_CPPFLAGS
=
-I
$(srcdir)
-I
$(top_builddir)
/include
AM_CPPFLAGS
+=
-I
$(top_srcdir)
/unittest/mytap
AM_CPPFLAGS
=
-I
$(srcdir)
-I
$(top_builddir)
/include
\
-I
$(top_srcdir)
/unittest/mytap
-I
$(top_srcdir)
/include
AM_LDFLAGS
=
-L
$(top_builddir)
/unittest/mytap
...
...
unittest/mytap/t/Makefile.am
View file @
8f957a80
AM_CPPFLAGS
=
-I
$(srcdir)
-I
$(top_builddir)
/include
AM_CPPFLAGS
+=
-I
$(srcdir)
/..
AM_CPPFLAGS
=
-I
$(srcdir)
-I
$(top_builddir)
/include
-I
$(srcdir)
/..
-I
$(top_srcdir)
/include
AM_LDFLAGS
=
-L
$(top_builddir)
/unittest/mytap
...
...
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