diff options
author | unknown <pekka@mysql.com> | 2005-01-08 00:03:19 +0100 |
---|---|---|
committer | unknown <pekka@mysql.com> | 2005-01-08 00:03:19 +0100 |
commit | 0338a61c8839979ee089089b5aa2fe5b4d633a2a (patch) | |
tree | e47d9a744727844ef1368b134038fe6da98a6d64 /sql/ha_ndbcluster.cc | |
parent | 6648761d67235ace2cd85125a54e04876a8f788b (diff) | |
download | mariadb-git-0338a61c8839979ee089089b5aa2fe5b4d633a2a.tar.gz |
ndb - wl-1442 minor
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
wl-1442 minor
ndb/test/ndbapi/testOIBasic.cpp:
wl-1442 minor
sql/ha_ndbcluster.cc:
wl-1442 minor
Diffstat (limited to 'sql/ha_ndbcluster.cc')
-rw-r--r-- | sql/ha_ndbcluster.cc | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 767ddc40400..a964ffe6fb9 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -3420,6 +3420,9 @@ int ndbcluster_rollback(THD *thd, void *ndb_transaction) Define NDB column based on Field. Returns 0 or mysql error code. Not member of ha_ndbcluster because NDBCOL cannot be declared. + + MySQL text types with character set "binary" are mapped to true + NDB binary types without a character set. This may change. */ static int create_ndb_column(NDBCOL &col, @@ -3509,7 +3512,7 @@ static int create_ndb_column(NDBCOL &col, col.setType(NDBCOL::Bit); col.setLength(1); } - else if (field->flags & BINARY_FLAG) + else if ((field->flags & BINARY_FLAG) && cs == &my_charset_bin) { col.setType(NDBCOL::Binary); col.setLength(field->pack_length()); @@ -3527,7 +3530,7 @@ static int create_ndb_column(NDBCOL &col, Field_varstring* f= (Field_varstring*)field; if (f->length_bytes == 1) { - if (field->flags & BINARY_FLAG) + if ((field->flags & BINARY_FLAG) && cs == &my_charset_bin) col.setType(NDBCOL::Varbinary); else { col.setType(NDBCOL::Varchar); @@ -3536,7 +3539,7 @@ static int create_ndb_column(NDBCOL &col, } else if (f->length_bytes == 2) { - if (field->flags & BINARY_FLAG) + if ((field->flags & BINARY_FLAG) && cs == &my_charset_bin) col.setType(NDBCOL::Longvarbinary); else { col.setType(NDBCOL::Longvarchar); @@ -3553,7 +3556,7 @@ static int create_ndb_column(NDBCOL &col, // Blob types (all come in as MYSQL_TYPE_BLOB) mysql_type_tiny_blob: case MYSQL_TYPE_TINY_BLOB: - if (field->flags & BINARY_FLAG) + if ((field->flags & BINARY_FLAG) && cs == &my_charset_bin) col.setType(NDBCOL::Blob); else { col.setType(NDBCOL::Text); @@ -3566,7 +3569,7 @@ static int create_ndb_column(NDBCOL &col, break; //mysql_type_blob: case MYSQL_TYPE_BLOB: - if (field->flags & BINARY_FLAG) + if ((field->flags & BINARY_FLAG) && cs == &my_charset_bin) col.setType(NDBCOL::Blob); else { col.setType(NDBCOL::Text); @@ -3588,7 +3591,7 @@ static int create_ndb_column(NDBCOL &col, break; mysql_type_medium_blob: case MYSQL_TYPE_MEDIUM_BLOB: - if (field->flags & BINARY_FLAG) + if ((field->flags & BINARY_FLAG) && cs == &my_charset_bin) col.setType(NDBCOL::Blob); else { col.setType(NDBCOL::Text); @@ -3600,7 +3603,7 @@ static int create_ndb_column(NDBCOL &col, break; mysql_type_long_blob: case MYSQL_TYPE_LONG_BLOB: - if (field->flags & BINARY_FLAG) + if ((field->flags & BINARY_FLAG) && cs == &my_charset_bin) col.setType(NDBCOL::Blob); else { col.setType(NDBCOL::Text); |