Commit 8a4c0714 authored by unknown's avatar unknown

Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.1

into  mysql.com:/home/jonas/src/mysql-5.1-push


sql/ha_ndbcluster.cc:
  Auto merged
storage/ndb/include/kernel/signaldata/AlterTable.hpp:
  Auto merged
storage/ndb/include/kernel/signaldata/DictTabInfo.hpp:
  Auto merged
storage/ndb/include/kernel/signaldata/DropTable.hpp:
  Auto merged
storage/ndb/include/ndbapi/NdbDictionary.hpp:
  Auto merged
storage/ndb/src/kernel/blocks/backup/Backup.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.hpp:
  Auto merged
storage/ndb/src/kernel/blocks/ndbfs/CircularIndex.hpp:
  Auto merged
storage/ndb/src/kernel/blocks/ndbfs/MemoryChannel.hpp:
  Auto merged
storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp:
  Auto merged
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  Auto merged
storage/ndb/src/ndbapi/ndberror.c:
  Auto merged
storage/ndb/test/include/HugoOperations.hpp:
  Auto merged
storage/ndb/test/ndbapi/testBackup.cpp:
  Auto merged
storage/ndb/test/ndbapi/testBlobs.cpp:
  Auto merged
storage/ndb/test/ndbapi/testNdbApi.cpp:
  Auto merged
storage/ndb/test/run-test/daily-basic-tests.txt:
  Auto merged
storage/ndb/test/run-test/ndb-autotest.sh:
  Auto merged
storage/ndb/test/src/HugoOperations.cpp:
  Auto merged
storage/ndb/tools/drop_index.cpp:
  Auto merged
storage/ndb/tools/listTables.cpp:
  Auto merged
parents eb9f8480 80437546
...@@ -7,7 +7,7 @@ AC_INIT(sql/mysqld.cc) ...@@ -7,7 +7,7 @@ AC_INIT(sql/mysqld.cc)
AC_CANONICAL_SYSTEM AC_CANONICAL_SYSTEM
# The Docs Makefile.am parses this line! # The Docs Makefile.am parses this line!
# Don't forget to also update the NDB lines below. # Don't forget to also update the NDB lines below.
AM_INIT_AUTOMAKE(mysql, 5.1.0-alpha) AM_INIT_AUTOMAKE(mysql, 5.1.1-alpha)
AM_CONFIG_HEADER(config.h) AM_CONFIG_HEADER(config.h)
PROTOCOL_VERSION=10 PROTOCOL_VERSION=10
...@@ -18,7 +18,7 @@ SHARED_LIB_VERSION=15:0:0 ...@@ -18,7 +18,7 @@ SHARED_LIB_VERSION=15:0:0
# ndb version # ndb version
NDB_VERSION_MAJOR=5 NDB_VERSION_MAJOR=5
NDB_VERSION_MINOR=1 NDB_VERSION_MINOR=1
NDB_VERSION_BUILD=0 NDB_VERSION_BUILD=1
NDB_VERSION_STATUS="alpha" NDB_VERSION_STATUS="alpha"
# Set all version vars based on $VERSION. How do we do this more elegant ? # Set all version vars based on $VERSION. How do we do this more elegant ?
......
...@@ -78,14 +78,6 @@ ...@@ -78,14 +78,6 @@
#endif #endif
#endif /* _WIN32... */ #endif /* _WIN32... */
/* Remove some things in embedded library */
#ifdef EMBEDDED_LIBRARY
/* No partition handler in embedded library */
#ifdef HAVE_PARTITION_DB
#undef HAVE_PARTITION_DB
#endif
#endif
/* Some defines to avoid ifdefs in the code */ /* Some defines to avoid ifdefs in the code */
#ifndef NETWARE_YIELD #ifndef NETWARE_YIELD
#define NETWARE_YIELD #define NETWARE_YIELD
......
...@@ -63,7 +63,7 @@ sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \ ...@@ -63,7 +63,7 @@ sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \
spatial.cc gstream.cc sql_help.cc tztime.cc protocol_cursor.cc \ spatial.cc gstream.cc sql_help.cc tztime.cc protocol_cursor.cc \
sp_head.cc sp_pcontext.cc sp.cc sp_cache.cc sp_rcontext.cc \ sp_head.cc sp_pcontext.cc sp.cc sp_cache.cc sp_rcontext.cc \
parse_file.cc rpl_filter.cc sql_view.cc sql_trigger.cc my_decimal.cc \ parse_file.cc rpl_filter.cc sql_view.cc sql_trigger.cc my_decimal.cc \
ha_blackhole.cc ha_blackhole.cc sql_partition.cc ha_partition.cc
libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources) $(sqlexamplessources) libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources) $(sqlexamplessources)
libmysqld_a_SOURCES= libmysqld_a_SOURCES=
......
...@@ -168,7 +168,7 @@ hex(a) hex(@u:=convert(a using utf8)) hex(@l:=convert(@u using latin1)) a=@l ...@@ -168,7 +168,7 @@ hex(a) hex(@u:=convert(a using utf8)) hex(@l:=convert(@u using latin1)) a=@l
7E 7E 7E 1 7E 7E 7E 1
7F 7F 7F 1 7F 7F 7F 1
80 E282AC 80 1 80 E282AC 80 1
81 3F 3F 0 81 C281 81 1
82 E2809A 82 1 82 E2809A 82 1
83 C692 83 1 83 C692 83 1
84 E2809E 84 1 84 E2809E 84 1
...@@ -180,10 +180,10 @@ hex(a) hex(@u:=convert(a using utf8)) hex(@l:=convert(@u using latin1)) a=@l ...@@ -180,10 +180,10 @@ hex(a) hex(@u:=convert(a using utf8)) hex(@l:=convert(@u using latin1)) a=@l
8A C5A0 8A 1 8A C5A0 8A 1
8B E280B9 8B 1 8B E280B9 8B 1
8C C592 8C 1 8C C592 8C 1
8D 3F 3F 0 8D C28D 8D 1
8E C5BD 8E 1 8E C5BD 8E 1
8F 3F 3F 0 8F C28F 8F 1
90 3F 3F 0 90 C290 90 1
91 E28098 91 1 91 E28098 91 1
92 E28099 92 1 92 E28099 92 1
93 E2809C 93 1 93 E2809C 93 1
...@@ -196,7 +196,7 @@ hex(a) hex(@u:=convert(a using utf8)) hex(@l:=convert(@u using latin1)) a=@l ...@@ -196,7 +196,7 @@ hex(a) hex(@u:=convert(a using utf8)) hex(@l:=convert(@u using latin1)) a=@l
9A C5A1 9A 1 9A C5A1 9A 1
9B E280BA 9B 1 9B E280BA 9B 1
9C C593 9C 1 9C C593 9C 1
9D 3F 3F 0 9D C29D 9D 1
9E C5BE 9E 1 9E C5BE 9E 1
9F C5B8 9F 1 9F C5B8 9F 1
A0 C2A0 A0 1 A0 C2A0 A0 1
......
...@@ -182,13 +182,13 @@ drop database mysqltest; ...@@ -182,13 +182,13 @@ drop database mysqltest;
select * from information_schema.CHARACTER_SETS select * from information_schema.CHARACTER_SETS
where CHARACTER_SET_NAME like 'latin1%'; where CHARACTER_SET_NAME like 'latin1%';
CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN
latin1 latin1_swedish_ci ISO 8859-1 West European 1 latin1 latin1_swedish_ci cp1252 West European 1
SHOW CHARACTER SET LIKE 'latin1%'; SHOW CHARACTER SET LIKE 'latin1%';
Charset Description Default collation Maxlen Charset Description Default collation Maxlen
latin1 ISO 8859-1 West European latin1_swedish_ci 1 latin1 cp1252 West European latin1_swedish_ci 1
SHOW CHARACTER SET WHERE charset like 'latin1%'; SHOW CHARACTER SET WHERE charset like 'latin1%';
Charset Description Default collation Maxlen Charset Description Default collation Maxlen
latin1 ISO 8859-1 West European latin1_swedish_ci 1 latin1 cp1252 West European latin1_swedish_ci 1
select * from information_schema.COLLATIONS select * from information_schema.COLLATIONS
where COLLATION_NAME like 'latin1%'; where COLLATION_NAME like 'latin1%';
COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN
...@@ -501,7 +501,7 @@ create table t1 select * from information_schema.CHARACTER_SETS ...@@ -501,7 +501,7 @@ create table t1 select * from information_schema.CHARACTER_SETS
where CHARACTER_SET_NAME like "latin1"; where CHARACTER_SET_NAME like "latin1";
select * from t1; select * from t1;
CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN
latin1 latin1_swedish_ci ISO 8859-1 West European 1 latin1 latin1_swedish_ci cp1252 West European 1
alter table t1 default character set utf8; alter table t1 default character set utf8;
show create table t1; show create table t1;
Table Create Table Table Create Table
......
...@@ -106,7 +106,7 @@ To make maintaining easier please: ...@@ -106,7 +106,7 @@ To make maintaining easier please:
<charset name="latin1"> <charset name="latin1">
<family>Western</family> <family>Western</family>
<description>ISO 8859-1 West European</description> <description>cp1252 West European</description>
<alias>csisolatin1</alias> <alias>csisolatin1</alias>
<alias>iso-8859-1</alias> <alias>iso-8859-1</alias>
<alias>iso-ir-100</alias> <alias>iso-ir-100</alias>
......
...@@ -253,7 +253,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, ...@@ -253,7 +253,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
MYI file and SPATIAL key *does have* additional sp_segs keysegs. MYI file and SPATIAL key *does have* additional sp_segs keysegs.
We'd better delete them now We'd better delete them now
*/ */
keydef->keysegs-=sp_segs; keydef->keysegs-=(sp_segs-1);
} }
for (j=0, keyseg=keydef->seg ; (int) j < keydef->keysegs ; for (j=0, keyseg=keydef->seg ; (int) j < keydef->keysegs ;
......
...@@ -6220,6 +6220,17 @@ void Dbdih::execCREATE_FRAGMENTATION_REQ(Signal * signal) ...@@ -6220,6 +6220,17 @@ void Dbdih::execCREATE_FRAGMENTATION_REQ(Signal * signal)
noOfFragments = 1; noOfFragments = 1;
set_default_node_groups(signal, noOfFragments); set_default_node_groups(signal, noOfFragments);
break; break;
case DictTabInfo::DistrKeyHash:
jam();
case DictTabInfo::DistrKeyLin:
jam();
if (noOfFragments == 0)
{
jam();
noOfFragments = csystemnodes;
set_default_node_groups(signal, noOfFragments);
}
break;
default: default:
jam(); jam();
if (noOfFragments == 0) if (noOfFragments == 0)
......
...@@ -505,19 +505,35 @@ NdbTableImpl::buildColumnHash(){ ...@@ -505,19 +505,35 @@ NdbTableImpl::buildColumnHash(){
Uint32 Uint32
NdbTableImpl::get_nodes(Uint32 hashValue, const Uint16 ** nodes) const NdbTableImpl::get_nodes(Uint32 hashValue, const Uint16 ** nodes) const
{ {
if(m_replicaCount > 0) Uint32 fragmentId;
if(m_replicaCount == 0)
return 0;
switch (m_fragmentType)
{ {
Uint32 fragmentId = hashValue & m_hashValueMask; case NdbDictionary::Object::FragAllSmall:
if(fragmentId < m_hashpointerValue) case NdbDictionary::Object::FragAllMedium:
case NdbDictionary::Object::FragAllLarge:
case NdbDictionary::Object::FragSingle:
case NdbDictionary::Object::DistrKeyLin:
{ {
fragmentId = hashValue & ((m_hashValueMask << 1) + 1); fragmentId = hashValue & m_hashValueMask;
if(fragmentId < m_hashpointerValue)
fragmentId = hashValue & ((m_hashValueMask << 1) + 1);
break;
} }
Uint32 pos = fragmentId * m_replicaCount; case NdbDictionary::Object::DistrKeyHash:
if(pos + m_replicaCount <= m_fragments.size())
{ {
* nodes = m_fragments.getBase()+pos; fragmentId = hashValue % m_fragmentCount;
return m_replicaCount; break;
} }
default:
return 0;
}
Uint32 pos = fragmentId * m_replicaCount;
if (pos + m_replicaCount <= m_fragments.size())
{
*nodes = m_fragments.getBase()+pos;
return m_replicaCount;
} }
return 0; return 0;
} }
......
...@@ -94,6 +94,15 @@ add_distribution_key(Ndb*, NdbDictionary::Table& tab, int when) ...@@ -94,6 +94,15 @@ add_distribution_key(Ndb*, NdbDictionary::Table& tab, int when)
} }
} }
} }
Uint32 linear_hash_ind = rand() & 1;
NdbDictionary::Table::FragmentType ftype;
if (linear_hash_ind)
ftype = NdbDictionary::Table::DistrKeyLin;
else
ftype = NdbDictionary::Table::DistrKeyHash;
tab.setFragmentType(ftype);
ndbout << (NDBT_Table&)tab << endl; ndbout << (NDBT_Table&)tab << endl;
return 0; return 0;
......
...@@ -108,6 +108,13 @@ static uchar sort_order_latin1[] = { ...@@ -108,6 +108,13 @@ static uchar sort_order_latin1[] = {
- continue to pretend the latin1 character set is ISO 8859-1 - continue to pretend the latin1 character set is ISO 8859-1
- actually allow the storage of euro etc. so it's actually cp1252 - actually allow the storage of euro etc. so it's actually cp1252
Also we'll map these five undefined cp1252 character:
0x81, 0x8D, 0x8F, 0x90, 0x9D
into corresponding control characters:
U+0081, U+008D, U+008F, U+0090, U+009D.
like ISO-8859-1 does. Otherwise, loading "mysqldump"
output doesn't reproduce these undefined characters.
*/ */
unsigned short cs_to_uni[256]={ unsigned short cs_to_uni[256]={
...@@ -127,10 +134,10 @@ unsigned short cs_to_uni[256]={ ...@@ -127,10 +134,10 @@ unsigned short cs_to_uni[256]={
0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, 0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
0x20AC,0x0000,0x201A,0x0192,0x201E,0x2026,0x2020,0x2021, 0x20AC,0x0081,0x201A,0x0192,0x201E,0x2026,0x2020,0x2021,
0x02C6,0x2030,0x0160,0x2039,0x0152,0x0000,0x017D,0x0000, 0x02C6,0x2030,0x0160,0x2039,0x0152,0x008D,0x017D,0x008F,
0x0000,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014, 0x0090,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014,
0x02DC,0x2122,0x0161,0x203A,0x0153,0x0000,0x017E,0x0178, 0x02DC,0x2122,0x0161,0x203A,0x0153,0x009D,0x017E,0x0178,
0x00A0,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7, 0x00A0,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,
0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF, 0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF,
0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7, 0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7,
...@@ -161,10 +168,10 @@ unsigned char pl00[256]={ ...@@ -161,10 +168,10 @@ unsigned char pl00[256]={
0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F, 0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77, 0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,
0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F, 0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x81,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x8D,0x00,0x8F,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x90,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x9D,0x00,0x00,
0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7, 0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,
0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, 0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7, 0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,
......
...@@ -28,12 +28,6 @@ EXTRA_DIST = Info.plist.sh \ ...@@ -28,12 +28,6 @@ EXTRA_DIST = Info.plist.sh \
StartupItem.Info.plist \ StartupItem.Info.plist \
StartupItem.postinstall StartupItem.postinstall
pkgdata_DATA = Info.plist \
Description.plist \
StartupParameters.plist \
postinstall \
preinstall
CLEANFILES = Info.plist \ CLEANFILES = Info.plist \
Description.plist \ Description.plist \
StartupParameters.plist \ StartupParameters.plist \
......
...@@ -38,8 +38,7 @@ pkgdata_DATA = my-small.cnf \ ...@@ -38,8 +38,7 @@ pkgdata_DATA = my-small.cnf \
my-huge.cnf \ my-huge.cnf \
my-innodb-heavy-4G.cnf \ my-innodb-heavy-4G.cnf \
mysql-log-rotate \ mysql-log-rotate \
mysql-@VERSION@.spec \ binary-configure \
MySQL-shared-compat.spec \
ndb-config-2-node.ini ndb-config-2-node.ini
pkgdata_SCRIPTS = mysql.server pkgdata_SCRIPTS = mysql.server
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment