From 34fa69a194eefe4ce4019c368e1233b079c1edf3 Mon Sep 17 00:00:00 2001 From: "igor@rurik.mysql.com" <> Date: Tue, 25 Jan 2005 14:30:38 -0800 Subject: [PATCH 01/11] order_by.result, order_by.test: Added a test case for bug #7672. sql_yacc.yy: Fixed bug #7672. Made queries of the form (SELECT ...) ORDER BY ... to be equivalent to SELECT ... ORDER BY ... --- mysql-test/r/order_by.result | 17 +++++++++++++++++ mysql-test/t/order_by.test | 13 ++++++++++++- sql/sql_yacc.yy | 13 ++++++++----- 3 files changed, 37 insertions(+), 6 deletions(-) diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result index 859d9d4cab0..4ea638dbc19 100644 --- a/mysql-test/r/order_by.result +++ b/mysql-test/r/order_by.result @@ -554,3 +554,20 @@ explain select id,t from t1 force index (primary) order by id; table type possible_keys key key_len ref rows Extra t1 index NULL PRIMARY 4 NULL 1000 drop table t1; +CREATE TABLE t1 (a int); +INSERT INTO t1 VALUES (2), (1), (1), (2), (1); +SELECT a FROM t1 ORDER BY a; +a +1 +1 +1 +2 +2 +(SELECT a FROM t1) ORDER BY a; +a +1 +1 +1 +2 +2 +DROP TABLE t1; diff --git a/mysql-test/t/order_by.test b/mysql-test/t/order_by.test index 86ecc4aa70d..d65b2c257a1 100644 --- a/mysql-test/t/order_by.test +++ b/mysql-test/t/order_by.test @@ -363,4 +363,15 @@ while ($1) enable_query_log; explain select id,t from t1 order by id; explain select id,t from t1 force index (primary) order by id; -drop table t1; \ No newline at end of file +drop table t1; + +# +# Bug #7672 - a wrong result for a select query in braces followed by order by +# + +CREATE TABLE t1 (a int); +INSERT INTO t1 VALUES (2), (1), (1), (2), (1); +SELECT a FROM t1 ORDER BY a; +(SELECT a FROM t1) ORDER BY a; +DROP TABLE t1; + diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 7b72c73a915..6d0237f5615 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -4033,11 +4033,14 @@ optional_order_or_limit: send_error(&lex->thd->net, ER_SYNTAX_ERROR); YYABORT; } - if (mysql_new_select(lex)) - YYABORT; - mysql_init_select(lex); - lex->select->linkage=NOT_A_SELECT; - lex->select->select_limit=lex->thd->variables.select_limit; + if (lex->select != &lex->select_lex) + { + if (mysql_new_select(lex)) + YYABORT; + mysql_init_select(lex); + lex->select->linkage=NOT_A_SELECT; + lex->select->select_limit=lex->thd->variables.select_limit; + } } opt_order_clause limit_clause ; From 5cbadf43581d9a456e69a4a69a38a2593fc3d9ab Mon Sep 17 00:00:00 2001 From: "pekka@mysql.com" <> Date: Thu, 27 Jan 2005 17:33:35 +0100 Subject: [PATCH 02/11] ndb - make YEAR and TIMESTAMP into ndb types --- mysql-test/r/ndb_index_ordered.result | 44 +++++++--- mysql-test/t/ndb_index_ordered.test | 30 ++++--- ndb/include/kernel/signaldata/DictTabInfo.hpp | 14 ++- ndb/include/ndbapi/NdbDictionary.hpp | 4 +- ndb/include/util/NdbSqlUtil.hpp | 6 +- ndb/src/common/util/NdbSqlUtil.cpp | 36 ++++++++ ndb/src/ndbapi/NdbDictionary.cpp | 6 ++ ndb/src/ndbapi/NdbDictionaryImpl.cpp | 4 + ndb/src/ndbapi/NdbRecAttr.cpp | 85 +++++++++++++++++-- ndb/test/include/NdbSchemaOp.hpp | 4 - sql/ha_ndbcluster.cc | 19 +++-- 11 files changed, 209 insertions(+), 43 deletions(-) diff --git a/mysql-test/r/ndb_index_ordered.result b/mysql-test/r/ndb_index_ordered.result index 943571aa524..12438f247c3 100644 --- a/mysql-test/r/ndb_index_ordered.result +++ b/mysql-test/r/ndb_index_ordered.result @@ -323,16 +323,16 @@ index(ye), index(ti), index(ts) ) engine=ndb; -insert into t1 (pk,dt,da,ye,ti) values -(1, '1901-05-05 23:00:59', '1901-05-05', '1901', '23:00:59'), -(2, '1912-09-05 13:00:59', '1912-09-05', '1912', '13:00:59'), -(3, '1945-12-31 00:00:00', '1945-12-31', '1945', '00:00:00'), -(4, '1955-12-31 00:00:00', '1955-12-31', '1955', '00:00:00'), -(5, '1963-06-06 06:06:06', '1963-06-06', '1963', '06:06:06'), -(6, '1993-06-06 06:06:06', '1993-06-06', '1993', '06:06:06'), -(7, '2001-01-01 10:11:10', '2001-01-01', '2001', '10:11:10'), -(8, '2001-01-01 10:11:11', '2001-01-01', '2001', '10:11:11'), -(9, '2005-01-31 23:59:59', '2005-01-31', '2005', '23:59:59'); +insert into t1 (pk,dt,da,ye,ti,ts) values +(1, '1901-05-05 23:00:59', '1901-05-05', '1901', '23:00:59', '2001-01-01 23:00:59'), +(2, '1912-09-05 13:00:59', '1912-09-05', '1912', '13:00:59', '2001-01-01 13:00:59'), +(3, '1945-12-31 00:00:00', '1945-12-31', '1945', '00:00:00', '2001-01-01 00:00:00'), +(4, '1955-12-31 00:00:00', '1955-12-31', '1955', '00:00:00', '2001-01-01 00:00:00'), +(5, '1963-06-06 06:06:06', '1963-06-06', '1963', '06:06:06', '2001-01-01 06:06:06'), +(6, '1993-06-06 06:06:06', '1993-06-06', '1993', '06:06:06', '2001-01-01 06:06:06'), +(7, '2001-01-01 10:11:10', '2001-01-01', '2001', '10:11:10', '2001-01-01 10:11:10'), +(8, '2001-01-01 10:11:11', '2001-01-01', '2001', '10:11:11', '2001-01-01 10:11:11'), +(9, '2005-01-31 23:59:59', '2005-01-31', '2005', '23:59:59', '2001-01-01 23:59:59'); select count(*)-9 from t1 use index (dt) where dt > '1900-01-01 00:00:00'; count(*)-9 0 @@ -420,6 +420,30 @@ count(*)-8 select count(*)-9 from t1 use index (ti) where ti <= '23:59:59'; count(*)-9 0 +select count(*)-9 from t1 use index (ts) where ts >= '2001-01-01 00:00:00'; +count(*)-9 +0 +select count(*)-7 from t1 use index (ts) where ts > '2001-01-01 00:00:00'; +count(*)-7 +0 +select count(*)-7 from t1 use index (ts) where ts > '2001-01-01 05:05:05'; +count(*)-7 +0 +select count(*)-5 from t1 use index (ts) where ts > '2001-01-01 06:06:06'; +count(*)-5 +0 +select count(*)-5 from t1 use index (ts) where ts < '2001-01-01 10:11:11'; +count(*)-5 +0 +select count(*)-6 from t1 use index (ts) where ts <= '2001-01-01 10:11:11'; +count(*)-6 +0 +select count(*)-8 from t1 use index (ts) where ts < '2001-01-01 23:59:59'; +count(*)-8 +0 +select count(*)-9 from t1 use index (ts) where ts <= '2001-01-01 23:59:59'; +count(*)-9 +0 drop table t1; create table t1(a int primary key, b int not null, index(b)); insert into t1 values (1,1), (2,2); diff --git a/mysql-test/t/ndb_index_ordered.test b/mysql-test/t/ndb_index_ordered.test index 89f1e5b7e9f..47e6b93eb81 100644 --- a/mysql-test/t/ndb_index_ordered.test +++ b/mysql-test/t/ndb_index_ordered.test @@ -189,16 +189,16 @@ create table t1 ( index(ts) ) engine=ndb; -insert into t1 (pk,dt,da,ye,ti) values - (1, '1901-05-05 23:00:59', '1901-05-05', '1901', '23:00:59'), - (2, '1912-09-05 13:00:59', '1912-09-05', '1912', '13:00:59'), - (3, '1945-12-31 00:00:00', '1945-12-31', '1945', '00:00:00'), - (4, '1955-12-31 00:00:00', '1955-12-31', '1955', '00:00:00'), - (5, '1963-06-06 06:06:06', '1963-06-06', '1963', '06:06:06'), - (6, '1993-06-06 06:06:06', '1993-06-06', '1993', '06:06:06'), - (7, '2001-01-01 10:11:10', '2001-01-01', '2001', '10:11:10'), - (8, '2001-01-01 10:11:11', '2001-01-01', '2001', '10:11:11'), - (9, '2005-01-31 23:59:59', '2005-01-31', '2005', '23:59:59'); +insert into t1 (pk,dt,da,ye,ti,ts) values + (1, '1901-05-05 23:00:59', '1901-05-05', '1901', '23:00:59', '2001-01-01 23:00:59'), + (2, '1912-09-05 13:00:59', '1912-09-05', '1912', '13:00:59', '2001-01-01 13:00:59'), + (3, '1945-12-31 00:00:00', '1945-12-31', '1945', '00:00:00', '2001-01-01 00:00:00'), + (4, '1955-12-31 00:00:00', '1955-12-31', '1955', '00:00:00', '2001-01-01 00:00:00'), + (5, '1963-06-06 06:06:06', '1963-06-06', '1963', '06:06:06', '2001-01-01 06:06:06'), + (6, '1993-06-06 06:06:06', '1993-06-06', '1993', '06:06:06', '2001-01-01 06:06:06'), + (7, '2001-01-01 10:11:10', '2001-01-01', '2001', '10:11:10', '2001-01-01 10:11:10'), + (8, '2001-01-01 10:11:11', '2001-01-01', '2001', '10:11:11', '2001-01-01 10:11:11'), + (9, '2005-01-31 23:59:59', '2005-01-31', '2005', '23:59:59', '2001-01-01 23:59:59'); # datetime select count(*)-9 from t1 use index (dt) where dt > '1900-01-01 00:00:00'; @@ -237,6 +237,16 @@ select count(*)-6 from t1 use index (ti) where ti <= '10:11:11'; select count(*)-8 from t1 use index (ti) where ti < '23:59:59'; select count(*)-9 from t1 use index (ti) where ti <= '23:59:59'; +# timestamp +select count(*)-9 from t1 use index (ts) where ts >= '2001-01-01 00:00:00'; +select count(*)-7 from t1 use index (ts) where ts > '2001-01-01 00:00:00'; +select count(*)-7 from t1 use index (ts) where ts > '2001-01-01 05:05:05'; +select count(*)-5 from t1 use index (ts) where ts > '2001-01-01 06:06:06'; +select count(*)-5 from t1 use index (ts) where ts < '2001-01-01 10:11:11'; +select count(*)-6 from t1 use index (ts) where ts <= '2001-01-01 10:11:11'; +select count(*)-8 from t1 use index (ts) where ts < '2001-01-01 23:59:59'; +select count(*)-9 from t1 use index (ts) where ts <= '2001-01-01 23:59:59'; + drop table t1; # bug#7798 diff --git a/ndb/include/kernel/signaldata/DictTabInfo.hpp b/ndb/include/kernel/signaldata/DictTabInfo.hpp index 3e73ae67ebe..ade6c22a5bd 100644 --- a/ndb/include/kernel/signaldata/DictTabInfo.hpp +++ b/ndb/include/kernel/signaldata/DictTabInfo.hpp @@ -311,7 +311,9 @@ public: ExtDate = NdbSqlUtil::Type::Date, ExtBlob = NdbSqlUtil::Type::Blob, ExtText = NdbSqlUtil::Type::Text, - ExtTime = NdbSqlUtil::Type::Time + ExtTime = NdbSqlUtil::Type::Time, + ExtYear = NdbSqlUtil::Type::Year, + ExtTimestamp = NdbSqlUtil::Type::Timestamp }; // Attribute data interpretation @@ -446,6 +448,16 @@ public: AttributeSize = DictTabInfo::an8Bit; AttributeArraySize = 3 * AttributeExtLength; return true; + case DictTabInfo::ExtYear: + AttributeType = DictTabInfo::StringType; + AttributeSize = DictTabInfo::an8Bit; + AttributeArraySize = 1 * AttributeExtLength; + return true; + case DictTabInfo::ExtTimestamp: + AttributeType = DictTabInfo::StringType; + AttributeSize = DictTabInfo::an8Bit; + AttributeArraySize = 4 * AttributeExtLength; + return true; }; return false; } diff --git a/ndb/include/ndbapi/NdbDictionary.hpp b/ndb/include/ndbapi/NdbDictionary.hpp index 454b267d1b0..0dca1c0f106 100644 --- a/ndb/include/ndbapi/NdbDictionary.hpp +++ b/ndb/include/ndbapi/NdbDictionary.hpp @@ -188,7 +188,9 @@ public: Date, ///< Precision down to 1 day(sizeof(Date) == 4 bytes ) Blob, ///< Binary large object (see NdbBlob) Text, ///< Text blob - Time = 25 ///< Time without date + Time = 25, ///< Time without date + Year = 26, ///< Year 1901-2155 (1 byte) + Timestamp = 27 ///< Unix time }; /** diff --git a/ndb/include/util/NdbSqlUtil.hpp b/ndb/include/util/NdbSqlUtil.hpp index 10024d9b616..3787814052a 100644 --- a/ndb/include/util/NdbSqlUtil.hpp +++ b/ndb/include/util/NdbSqlUtil.hpp @@ -84,7 +84,9 @@ public: Date, // Precision down to 1 day (size 4 bytes) Blob, // Blob Text, // Text blob - Time = 25 // Time without date + Time = 25, // Time without date + Year = 26, // Year (size 1 byte) + Timestamp = 27 // Unix seconds (uint32) }; Enum m_typeId; Cmp* m_cmp; // comparison method @@ -137,6 +139,8 @@ private: static Cmp cmpBlob; static Cmp cmpText; static Cmp cmpTime; + static Cmp cmpYear; + static Cmp cmpTimestamp; }; #endif diff --git a/ndb/src/common/util/NdbSqlUtil.cpp b/ndb/src/common/util/NdbSqlUtil.cpp index 233698ae52b..6b23da774af 100644 --- a/ndb/src/common/util/NdbSqlUtil.cpp +++ b/ndb/src/common/util/NdbSqlUtil.cpp @@ -179,6 +179,14 @@ NdbSqlUtil::m_typeList[] = { { Type::Time, cmpTime + }, + { + Type::Year, + cmpYear + }, + { + Type::Timestamp, + cmpTimestamp } }; @@ -592,6 +600,34 @@ NdbSqlUtil::cmpTime(const void* info, const Uint32* p1, const Uint32* p2, Uint32 return 0; } +int +NdbSqlUtil::cmpYear(const void* info, const Uint32* p1, const Uint32* p2, Uint32 full, Uint32 size) +{ + assert(full >= size && size > 0); + union { const Uint32* p; const unsigned char* v; } u1, u2; + u1.p = p1; + u2.p = p2; + if (u1.v[0] < u2.v[0]) + return -1; + if (u1.v[0] > u2.v[0]) + return +1; + return 0; +} + +int +NdbSqlUtil::cmpTimestamp(const void* info, const Uint32* p1, const Uint32* p2, Uint32 full, Uint32 size) +{ + assert(full >= size && size > 0); + union { Uint32 p[1]; Uint32 v; } u1, u2; + u1.v = p1[0]; + u2.v = p2[0]; + if (u1.v < u2.v) + return -1; + if (u1.v > u2.v) + return +1; + return 0; +} + // check charset bool diff --git a/ndb/src/ndbapi/NdbDictionary.cpp b/ndb/src/ndbapi/NdbDictionary.cpp index 0508d8bf277..58b35c6c306 100644 --- a/ndb/src/ndbapi/NdbDictionary.cpp +++ b/ndb/src/ndbapi/NdbDictionary.cpp @@ -950,6 +950,12 @@ operator<<(NdbOut& out, const NdbDictionary::Column& col) case NdbDictionary::Column::Time: out << "Time"; break; + case NdbDictionary::Column::Year: + out << "Year"; + break; + case NdbDictionary::Column::Timestamp: + out << "Timestamp"; + break; case NdbDictionary::Column::Undefined: out << "Undefined"; break; diff --git a/ndb/src/ndbapi/NdbDictionaryImpl.cpp b/ndb/src/ndbapi/NdbDictionaryImpl.cpp index 59474943f3b..9f6ed144fb0 100644 --- a/ndb/src/ndbapi/NdbDictionaryImpl.cpp +++ b/ndb/src/ndbapi/NdbDictionaryImpl.cpp @@ -149,6 +149,8 @@ NdbColumnImpl::init(Type t) m_cs = default_cs; break; case Time: + case Year: + case Timestamp: m_precision = 0; m_scale = 0; m_length = 1; @@ -1184,6 +1186,8 @@ columnTypeMapping[] = { { DictTabInfo::ExtBlob, NdbDictionary::Column::Blob }, { DictTabInfo::ExtText, NdbDictionary::Column::Text }, { DictTabInfo::ExtTime, NdbDictionary::Column::Time }, + { DictTabInfo::ExtYear, NdbDictionary::Column::Year }, + { DictTabInfo::ExtTimestamp, NdbDictionary::Column::Timestamp }, { -1, -1 } }; diff --git a/ndb/src/ndbapi/NdbRecAttr.cpp b/ndb/src/ndbapi/NdbRecAttr.cpp index f2427fb32e8..6749a0f04d9 100644 --- a/ndb/src/ndbapi/NdbRecAttr.cpp +++ b/ndb/src/ndbapi/NdbRecAttr.cpp @@ -156,10 +156,11 @@ NdbOut& operator<<(NdbOut& out, const NdbRecAttr &r) return out; } - if (r.arraySize() > 1) + uint length = r.getColumn()->getLength(); + if (length > 1) out << "["; - for (Uint32 j = 0; j < r.arraySize(); j++) + for (Uint32 j = 0; j < length; j++) { if (j > 0) out << " "; @@ -192,14 +193,14 @@ NdbOut& operator<<(NdbOut& out, const NdbRecAttr &r) break; case NdbDictionary::Column::Char: out.print("%.*s", r.arraySize(), r.aRef()); - j = r.arraySize(); + j = length; break; case NdbDictionary::Column::Varchar: { short len = ntohs(r.u_short_value()); out.print("%.*s", len, r.aRef()+2); } - j = r.arraySize(); + j = length; break; case NdbDictionary::Column::Float: out << r.float_value(); @@ -207,6 +208,74 @@ NdbOut& operator<<(NdbOut& out, const NdbRecAttr &r) case NdbDictionary::Column::Double: out << r.double_value(); break; + // for dates cut-and-paste from field.cc + case NdbDictionary::Column::Datetime: + { + ulonglong tmp=r.u_64_value(); + long part1,part2,part3; + part1=(long) (tmp/LL(1000000)); + part2=(long) (tmp - (ulonglong) part1*LL(1000000)); + char buf[40]; + char* pos=(char*) buf+19; + *pos--=0; + *pos--= (char) ('0'+(char) (part2%10)); part2/=10; + *pos--= (char) ('0'+(char) (part2%10)); part3= (int) (part2 / 10); + *pos--= ':'; + *pos--= (char) ('0'+(char) (part3%10)); part3/=10; + *pos--= (char) ('0'+(char) (part3%10)); part3/=10; + *pos--= ':'; + *pos--= (char) ('0'+(char) (part3%10)); part3/=10; + *pos--= (char) ('0'+(char) part3); + *pos--= '/'; + *pos--= (char) ('0'+(char) (part1%10)); part1/=10; + *pos--= (char) ('0'+(char) (part1%10)); part1/=10; + *pos--= '-'; + *pos--= (char) ('0'+(char) (part1%10)); part1/=10; + *pos--= (char) ('0'+(char) (part1%10)); part3= (int) (part1/10); + *pos--= '-'; + *pos--= (char) ('0'+(char) (part3%10)); part3/=10; + *pos--= (char) ('0'+(char) (part3%10)); part3/=10; + *pos--= (char) ('0'+(char) (part3%10)); part3/=10; + *pos=(char) ('0'+(char) part3); + out << buf; + } + break; + case NdbDictionary::Column::Date: + { + uint tmp=uint3korr(r.aRef()); + int year=(int) ((uint32) tmp/10000L % 10000); + int month=(int) ((uint32) tmp/100 % 100); + int day=(int) ((uint32) tmp % 100); + char buf[40]; + sprintf(buf, "%04d-%02d-%02d", year, month, day); + out << buf; + } + break; + case NdbDictionary::Column::Time: + { + long tmp=(long) sint3korr(r.aRef()); + int hour=(uint) (tmp/10000); + int minute=(uint) (tmp/100 % 100); + int second=(uint) (tmp % 100); + char buf[40]; + sprintf(buf, "%02d:%02d:%02d", hour, minute, second); + out << buf; + } + break; + case NdbDictionary::Column::Year: + { + uint year = 1900 + r.u_char_value(); + char buf[40]; + sprintf(buf, "%04d", year); + out << buf; + } + break; + case NdbDictionary::Column::Timestamp: + { + time_t time = r.u_32_value(); + out << (uint)time; + } + break; case NdbDictionary::Column::Blob: { const NdbBlob::Head* h = (const NdbBlob::Head*)r.aRef(); @@ -215,7 +284,7 @@ NdbOut& operator<<(NdbOut& out, const NdbRecAttr &r) unsigned n = r.arraySize() - sizeof(*h); for (unsigned k = 0; k < n && k < h->length; k++) out.print("%02X", (int)p[k]); - j = r.arraySize(); + j = length; } break; case NdbDictionary::Column::Text: @@ -226,19 +295,19 @@ NdbOut& operator<<(NdbOut& out, const NdbRecAttr &r) unsigned n = r.arraySize() - sizeof(*h); for (unsigned k = 0; k < n && k < h->length; k++) out.print("%c", (int)p[k]); - j = r.arraySize(); + j = length; } break; default: /* no print functions for the rest, just print type */ out << (int) r.getType(); - j = r.arraySize(); + j = length; if (j > 1) out << " " << j << " times"; break; } } - if (r.arraySize() > 1) + if (length > 1) { out << "]"; } diff --git a/ndb/test/include/NdbSchemaOp.hpp b/ndb/test/include/NdbSchemaOp.hpp index e2fb4015b88..77e704c0e5c 100644 --- a/ndb/test/include/NdbSchemaOp.hpp +++ b/ndb/test/include/NdbSchemaOp.hpp @@ -575,10 +575,6 @@ convertColumnTypeToAttrType(NdbDictionary::Column::Type _type) case NdbDictionary::Column::Binary: case NdbDictionary::Column::Varbinary: return String; - case NdbDictionary::Column::Datetime: - case NdbDictionary::Column::Date: - case NdbDictionary::Column::Time: - case NdbDictionary::Column::Undefined: default: return NoAttrTypeDef; } diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 437b5ebcdf7..a959cbaf434 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -3360,14 +3360,14 @@ static int create_ndb_column(NDBCOL &col, col.setLength(1); break; // Date types - case MYSQL_TYPE_TIMESTAMP: - col.setType(NDBCOL::Unsigned); - col.setLength(1); - break; case MYSQL_TYPE_DATETIME: col.setType(NDBCOL::Datetime); col.setLength(1); break; + case MYSQL_TYPE_DATE: // ? + col.setType(NDBCOL::Char); + col.setLength(field->pack_length()); + break; case MYSQL_TYPE_NEWDATE: col.setType(NDBCOL::Date); col.setLength(1); @@ -3376,10 +3376,13 @@ static int create_ndb_column(NDBCOL &col, col.setType(NDBCOL::Time); col.setLength(1); break; - case MYSQL_TYPE_DATE: // ? - case MYSQL_TYPE_YEAR: - col.setType(NDBCOL::Char); - col.setLength(field->pack_length()); + case MYSQL_TYPE_YEAR: + col.setType(NDBCOL::Year); + col.setLength(1); + break; + case MYSQL_TYPE_TIMESTAMP: + col.setType(NDBCOL::Timestamp); + col.setLength(1); break; // Char types case MYSQL_TYPE_STRING: From e27c58b9083d9bc2d0e21c29ee8430eb625f5499 Mon Sep 17 00:00:00 2001 From: "pekka@mysql.com" <> Date: Thu, 27 Jan 2005 21:23:21 +0100 Subject: [PATCH 03/11] ndb - post-merge fix --- ndb/include/ndb_constants.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ndb/include/ndb_constants.h b/ndb/include/ndb_constants.h index a04afe1bd72..da3fc2cbdd8 100644 --- a/ndb/include/ndb_constants.h +++ b/ndb/include/ndb_constants.h @@ -61,7 +61,9 @@ #define NDB_TYPE_LONG_VARCHAR 23 #define NDB_TYPE_LONG_VARBINARY 24 #define NDB_TYPE_TIME 25 +#define NDB_TYPE_YEAR 26 +#define NDB_TYPE_TIMESTAMP 27 -#define NDB_TYPE_MAX 26 +#define NDB_TYPE_MAX 28 #endif From 0cbd4970bf2a58925380e0b516d23604f85610e7 Mon Sep 17 00:00:00 2001 From: "pekka@mysql.com" <> Date: Fri, 28 Jan 2005 10:51:30 +0100 Subject: [PATCH 04/11] ndb - fix DATE printout --- ndb/src/ndbapi/NdbRecAttr.cpp | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/ndb/src/ndbapi/NdbRecAttr.cpp b/ndb/src/ndbapi/NdbRecAttr.cpp index 6749a0f04d9..9c9a9cea8da 100644 --- a/ndb/src/ndbapi/NdbRecAttr.cpp +++ b/ndb/src/ndbapi/NdbRecAttr.cpp @@ -242,12 +242,24 @@ NdbOut& operator<<(NdbOut& out, const NdbRecAttr &r) break; case NdbDictionary::Column::Date: { - uint tmp=uint3korr(r.aRef()); - int year=(int) ((uint32) tmp/10000L % 10000); - int month=(int) ((uint32) tmp/100 % 100); - int day=(int) ((uint32) tmp % 100); + uint32 tmp=(uint32) uint3korr(r.aRef()); + int part; char buf[40]; - sprintf(buf, "%04d-%02d-%02d", year, month, day); + char *pos=(char*) buf+10; + *pos--=0; + part=(int) (tmp & 31); + *pos--= (char) ('0'+part%10); + *pos--= (char) ('0'+part/10); + *pos--= '-'; + part=(int) (tmp >> 5 & 15); + *pos--= (char) ('0'+part%10); + *pos--= (char) ('0'+part/10); + *pos--= '-'; + part=(int) (tmp >> 9); + *pos--= (char) ('0'+part%10); part/=10; + *pos--= (char) ('0'+part%10); part/=10; + *pos--= (char) ('0'+part%10); part/=10; + *pos= (char) ('0'+part); out << buf; } break; From 834295866535d09127c4c5b75a1af698559153a7 Mon Sep 17 00:00:00 2001 From: "marko@hundin.mysql.fi" <> Date: Fri, 28 Jan 2005 12:18:33 +0200 Subject: [PATCH 05/11] InnoDB: Allow concurrent TRUNCATE and INSERT on a table. (Bug #8144) --- innobase/include/rem0rec.ic | 4 ++-- innobase/include/trx0trx.h | 4 +++- innobase/row/row0mysql.c | 12 ------------ sql/ha_innodb.cc | 5 +++-- 4 files changed, 8 insertions(+), 17 deletions(-) diff --git a/innobase/include/rem0rec.ic b/innobase/include/rem0rec.ic index ca69b9ca871..366f1c3f77d 100644 --- a/innobase/include/rem0rec.ic +++ b/innobase/include/rem0rec.ic @@ -526,7 +526,7 @@ bits of a record. (Only compact records have status bits.) */ UNIV_INLINE ulint rec_get_info_and_status_bits( -/*==============*/ +/*=========================*/ /* out: info bits */ rec_t* rec, /* in: physical record */ ibool comp) /* in: TRUE=compact page format */ @@ -550,7 +550,7 @@ bits of a record. (Only compact records have status bits.) */ UNIV_INLINE void rec_set_info_and_status_bits( -/*==============*/ +/*=========================*/ rec_t* rec, /* in: physical record */ ibool comp, /* in: TRUE=compact page format */ ulint bits) /* in: info bits */ diff --git a/innobase/include/trx0trx.h b/innobase/include/trx0trx.h index 76b051105de..b63afdd526c 100644 --- a/innobase/include/trx0trx.h +++ b/innobase/include/trx0trx.h @@ -383,7 +383,9 @@ struct trx_struct{ dulint commit_lsn; /* lsn at the time of the commit */ ibool dict_operation; /* TRUE if the trx is used to create a table, create an index, or drop a - table */ + table. This is a hint that the table + may need to be dropped in crash + recovery. */ dulint table_id; /* table id if the preceding field is TRUE */ /*------------------------------*/ diff --git a/innobase/row/row0mysql.c b/innobase/row/row0mysql.c index 6aaa0cbcf1b..2c4eebedaf7 100644 --- a/innobase/row/row0mysql.c +++ b/innobase/row/row0mysql.c @@ -2561,17 +2561,6 @@ do not allow the TRUNCATE. We also reserve the data dictionary latch. */ goto funct_exit; } - if (table->n_mysql_handles_opened > 1) { - ut_print_timestamp(stderr); -fputs(" InnoDB: Warning: MySQL is trying to truncate table ", stderr); - ut_print_name(stderr, trx, table->name); - fputs("\n" -"InnoDB: though there are still open handles to it.\n", stderr); - err = DB_ERROR; - - goto funct_exit; - } - /* TODO: could we replace the counter n_foreign_key_checks_running with lock checks on the table? Acquire here an exclusive lock on the table, and rewrite lock0lock.c and the lock wait in srv0srv.c so that @@ -2594,7 +2583,6 @@ fputs(" InnoDB: Warning: MySQL is trying to truncate table ", stderr); lock_reset_all_on_table(table); - trx->dict_operation = TRUE; trx->table_id = table->id; /* scan SYS_INDEXES for all indexes of the table */ diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index 18ab6f42d28..01580586bf6 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -5787,11 +5787,12 @@ ha_innobase::store_lock( if (lock_type != TL_IGNORE && lock.type == TL_UNLOCK) { /* If we are not doing a LOCK TABLE or DISCARD/IMPORT - TABLESPACE, then allow multiple writers */ + TABLESPACE or TRUNCATE TABLE, then allow multiple writers */ if ((lock_type >= TL_WRITE_CONCURRENT_INSERT && lock_type <= TL_WRITE) && !thd->in_lock_tables - && !thd->tablespace_op) { + && !thd->tablespace_op + && thd->lex->sql_command != SQLCOM_TRUNCATE) { lock_type = TL_WRITE_ALLOW_WRITE; } From b313dee5453c532a00ff11ca9e2f394fb27bc670 Mon Sep 17 00:00:00 2001 From: "tomas@poseidon.ndb.mysql.com" <> Date: Fri, 28 Jan 2005 13:01:00 +0100 Subject: [PATCH 06/11] NdbScanFilter.hpp: added docs --- ndb/include/ndbapi/NdbScanFilter.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ndb/include/ndbapi/NdbScanFilter.hpp b/ndb/include/ndbapi/NdbScanFilter.hpp index 5f214451321..7c575169dc1 100644 --- a/ndb/include/ndbapi/NdbScanFilter.hpp +++ b/ndb/include/ndbapi/NdbScanFilter.hpp @@ -53,7 +53,7 @@ public: COND_GE = 2, ///< upper bound COND_GT = 3, ///< upper bound, strict COND_EQ = 4, ///< equality - COND_NE = 5 + COND_NE = 5 ///< not equal }; /** From 6117ee754b33886098bf0ebaaa6bea9487ed828c Mon Sep 17 00:00:00 2001 From: "serg@serg.mylan" <> Date: Fri, 28 Jan 2005 13:49:42 +0100 Subject: [PATCH 07/11] fixed automake problem in dbug/Makefile.am --- dbug/Makefile.am | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dbug/Makefile.am b/dbug/Makefile.am index f8ddf0e6567..a951aff6094 100644 --- a/dbug/Makefile.am +++ b/dbug/Makefile.am @@ -26,6 +26,7 @@ EXTRA_DIST = example1.c example2.c example3.c \ NROFF_INC = example1.r example2.r example3.r main.r \ factorial.r output1.r output2.r output3.r \ output4.r output5.r +CLEANFILES = $(NROFF_INC) user.t user.ps # Must be linked with libs that are not compiled yet @@ -59,8 +60,5 @@ output5.r: factorial @RM@ -f $@ @SED@ -e 's!\\!\\\\!g' $< > $@ -clean: - @RM@ -f $(NROFF_INC) user.t user.ps - # Don't update the files from bitkeeper %::SCCS/s.% From 0434ecced3ea92f531c4dcc5c003290ce7da319a Mon Sep 17 00:00:00 2001 From: "gluh@gluh.mysql.r18.ru" <> Date: Fri, 28 Jan 2005 19:08:27 +0300 Subject: [PATCH 08/11] A fix: 'information_schema' test with ps-protocol option fails table_list->schema_table_name may be 0 in this case and 'strcasecmp' is not necessary in this case. --- sql/sql_show.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sql/sql_show.cc b/sql/sql_show.cc index defa99f3a36..e9126871045 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -3191,9 +3191,10 @@ int mysql_schema_table(THD *thd, LEX *lex, TABLE_LIST *table_list) views working correctly */ - table->alias_name_used= my_strcasecmp(table_alias_charset, - table_list->schema_table_name, - table_list->alias); + if (table_list->schema_table_name) + table->alias_name_used= my_strcasecmp(table_alias_charset, + table_list->schema_table_name, + table_list->alias); table_list->table_name= (char*) table->s->table_name; table_list->table= table; table->next= thd->derived_tables; From 852f2e0abac3b6eab3b8a0f978682af449a6be50 Mon Sep 17 00:00:00 2001 From: "serg@serg.mylan" <> Date: Fri, 28 Jan 2005 17:14:03 +0100 Subject: [PATCH 09/11] small Makefile.am cleanup clean: targets removed generated *.h files moved to include/ --- .bzrignore | 3 +++ Docs/Images/Makefile.am | 4 ---- client/Makefile.am | 2 +- extra/Makefile.am | 29 ++++++++++++----------- include/Makefile.am | 9 ++----- libmysql/Makefile.am | 2 +- libmysql_r/Makefile.am | 2 +- libmysqld/Makefile.am | 2 +- libmysqld/examples/Makefile.am | 15 +++++------- ndb/docs/Makefile.am | 2 +- scripts/Makefile.am | 2 +- server-tools/instance-manager/Makefile.am | 2 +- sql/Makefile.am | 6 ++--- sql/share/Makefile.am | 5 ++-- tools/Makefile.am | 2 +- 15 files changed, 39 insertions(+), 48 deletions(-) diff --git a/.bzrignore b/.bzrignore index 8a947d63b75..bb1cdb1c0c3 100644 --- a/.bzrignore +++ b/.bzrignore @@ -1052,3 +1052,6 @@ vio/test-ssl vio/test-sslclient vio/test-sslserver vio/viotest-ssl +include/mysqld_ername.h +include/mysqld_error.h +include/sql_state.h diff --git a/Docs/Images/Makefile.am b/Docs/Images/Makefile.am index b57d701d8a0..8ba1ff7382c 100644 --- a/Docs/Images/Makefile.am +++ b/Docs/Images/Makefile.am @@ -27,9 +27,5 @@ EXTRA_DIST = all: : -# Nothing to cleanup in this dummy directory. -clean: - : - # Don't update the files from bitkeeper %::SCCS/s.% diff --git a/client/Makefile.am b/client/Makefile.am index 9b62d698e38..2721953629e 100644 --- a/client/Makefile.am +++ b/client/Makefile.am @@ -18,7 +18,7 @@ #AUTOMAKE_OPTIONS = nostdinc INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/regex \ - $(openssl_includes) -I$(top_srcdir)/extra + $(openssl_includes) -I$(top_builddir)/include LIBS = @CLIENT_LIBS@ LDADD= @CLIENT_EXTRA_LDFLAGS@ \ $(top_builddir)/libmysql/libmysqlclient.la diff --git a/extra/Makefile.am b/extra/Makefile.am index 9f18cbf96e6..43981753515 100644 --- a/extra/Makefile.am +++ b/extra/Makefile.am @@ -16,25 +16,26 @@ INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include \ @ndbcluster_includes@ -I$(top_srcdir)/sql \ - -I$(top_srcdir)/extra + -I$(top_builddir)/include LDADD = @CLIENT_EXTRA_LDFLAGS@ ../mysys/libmysys.a \ ../dbug/libdbug.a ../strings/libmystrings.a -BUILT_SOURCES= mysqld_error.h sql_state.h mysqld_ername.h +BUILT_SOURCES= $(top_builddir)/include/mysqld_error.h \ + $(top_builddir)/include/sql_state.h \ + $(top_builddir)/include/mysqld_ername.h pkginclude_HEADERS= $(BUILT_SOURCES) -created_sources = created_include_files -CLEANFILES = $(created_sources) -SUPERCLEANFILES = $(BUILT_SOURCES) - -all: $(created_sources) +CLEANFILES = $(BUILT_SOURCES) # This will build mysqld_error.h and sql_state.h -mysqld_error.h: created_include_files -mysqld_ername.h: created_include_files -sql_state.h: created_include_files - -created_include_files: comp_err - $(top_builddir)/extra/comp_err --charset=$(srcdir)/../sql/share/charsets --out-dir=$(top_builddir)/sql/share/ --header_file=$(top_builddir)/extra/mysqld_error.h --name_file=$(top_builddir)/extra/mysqld_ername.h --state_file=$(top_builddir)/extra/sql_state.h --in_file=$(srcdir)/../sql/share/errmsg.txt - touch created_include_files +$(top_builddir)/include/mysqld_error.h: comp_err + $(top_builddir)/extra/comp_err \ + --charset=$(top_srcdir)/sql/share/charsets \ + --out-dir=$(top_builddir)/sql/share/ \ + --header_file=$(top_builddir)/include/mysqld_error.h \ + --name_file=$(top_builddir)/include/mysqld_ername.h \ + --state_file=$(top_builddir)/include/sql_state.h \ + --in_file=$(top_srcdir)/sql/share/errmsg.txt +$(top_builddir)/include/mysqld_ername.h: $(top_builddir)/include/mysqld_error.h +$(top_builddir)/include/sql_state.h: $(top_builddir)/include/mysqld_error.h bin_PROGRAMS = replace comp_err perror resolveip my_print_defaults \ resolve_stack_dump mysql_waitpid diff --git a/include/Makefile.am b/include/Makefile.am index e11ca2b4647..08beb4b7236 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -33,15 +33,10 @@ noinst_HEADERS = config-win.h config-os2.h config-netware.h \ mysql_version.h.in my_handler.h my_time.h decimal.h # mysql_version.h are generated -SUPERCLEANFILES = mysql_version.h my_config.h +CLEANFILES = mysql_version.h my_config.h readline # Some include files that may be moved and patched by configure -DISTCLEANFILES = sched.h $(SUPERCLEANFILES) - -clean: - $(RM) -fr readline -distclean: - $(RM) -fr readline +DISTCLEANFILES = sched.h $(CLEANFILES) all-local: my_config.h diff --git a/libmysql/Makefile.am b/libmysql/Makefile.am index 91ee5e66c83..0670a0befa8 100644 --- a/libmysql/Makefile.am +++ b/libmysql/Makefile.am @@ -24,7 +24,7 @@ target = libmysqlclient.la target_defs = -DUNDEF_THREADS_HACK -DDONT_USE_RAID @LIB_EXTRA_CCFLAGS@ LIBS = @CLIENT_LIBS@ INCLUDES = -I$(top_srcdir)/include $(openssl_includes) @ZLIB_INCLUDES@ \ - -I$(top_srcdir)/extra + -I$(top_builddir)/include include $(srcdir)/Makefile.shared diff --git a/libmysql_r/Makefile.am b/libmysql_r/Makefile.am index e8c576ca2b1..b83ee36dd39 100644 --- a/libmysql_r/Makefile.am +++ b/libmysql_r/Makefile.am @@ -26,7 +26,7 @@ LIBS = @LIBS@ @ZLIB_LIBS@ @openssl_libs@ INCLUDES = @MT_INCLUDES@ \ -I$(top_srcdir)/include $(openssl_includes) @ZLIB_INCLUDES@ \ - -I$(top_srcdir)/extra + -I$(top_builddir)/include ## automake barfs if you don't use $(srcdir) or $(top_srcdir) in include include $(top_srcdir)/libmysql/Makefile.shared diff --git a/libmysqld/Makefile.am b/libmysqld/Makefile.am index 4cd53216434..2f90d22f990 100644 --- a/libmysqld/Makefile.am +++ b/libmysqld/Makefile.am @@ -28,7 +28,7 @@ DEFS = -DEMBEDDED_LIBRARY -DMYSQL_SERVER \ INCLUDES= @MT_INCLUDES@ @bdb_includes@ -I$(top_srcdir)/include \ -I$(top_srcdir)/sql -I$(top_srcdir)/sql/examples \ -I$(top_srcdir)/regex \ - -I$(top_srcdir)/extra \ + -I$(top_builddir)/include \ $(openssl_includes) @ZLIB_INCLUDES@ noinst_LIBRARIES = libmysqld_int.a diff --git a/libmysqld/examples/Makefile.am b/libmysqld/examples/Makefile.am index d70d7330e55..bd18e7154aa 100644 --- a/libmysqld/examples/Makefile.am +++ b/libmysqld/examples/Makefile.am @@ -1,7 +1,8 @@ -noinst_PROGRAMS = mysql -bin_PROGRAMS = mysqltest_embedded mysql_client_test_embedded -client_sources = $(mysqltest_embedded_SOURCES) $(mysql_SOURCES) -tests_sources= $(mysql_client_test_embedded_SOURCES) +noinst_PROGRAMS = mysql +bin_PROGRAMS = mysqltest_embedded mysql_client_test_embedded +client_sources = $(mysqltest_embedded_SOURCES) $(mysql_SOURCES) +tests_sources = $(mysql_client_test_embedded_SOURCES) +CLEANFILES = $(client_sources) $(tests_sources) link_sources: for f in $(client_sources); do \ @@ -16,7 +17,7 @@ link_sources: DEFS = -DEMBEDDED_LIBRARY INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include -I$(srcdir) \ -I$(top_srcdir) -I$(top_srcdir)/client -I$(top_srcdir)/regex \ - -I$(top_srcdir)/extra $(openssl_includes) + -I$(top_builddir)/include $(openssl_includes) LIBS = @LIBS@ @WRAPLIBS@ @CLIENT_LIBS@ LDADD = @CLIENT_EXTRA_LDFLAGS@ ../libmysqld.a @innodb_system_libs@ @LIBDL@ $(CXXLDFLAGS) @@ -31,9 +32,5 @@ mysql_LDADD = @readline_link@ @TERMCAP_LIB@ $(LDADD) mysql_client_test_embedded_LINK = $(CXXLINK) mysql_client_test_embedded_SOURCES = mysql_client_test.c -clean: - rm -f $(client_sources) - rm -f $(tests_sources) - # Don't update the files from bitkeeper %::SCCS/s.% diff --git a/ndb/docs/Makefile.am b/ndb/docs/Makefile.am index 6d4cdc12cf6..1f00d463f08 100644 --- a/ndb/docs/Makefile.am +++ b/ndb/docs/Makefile.am @@ -9,7 +9,7 @@ DOXYOUT = .doxyout NDB_RELEASE = @NDB_VERSION_MAJOR@.@NDB_VERSION_MINOR@.@NDB_VERSION_BUILD@-@NDB_VERSION_STATUS@ -clean: +clean-local: rm -rf ndbapi.pdf ndbapi.html mgmapi.pdf mgmapi.html rm -rf $(DOXYTMP) $(DOXYOUT) diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 71b70fc0e4a..221fab13635 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -90,7 +90,7 @@ CLEANFILES = @server_scripts@ \ fill_help_tables \ mysql_create_system_tables -SUPERCLEANFILES = mysqlbug +DISTCLEANFILES = mysqlbug # We want the right version and configure comand line in mysqlbug mysqlbug: ${top_builddir}/config.status mysqlbug.sh diff --git a/server-tools/instance-manager/Makefile.am b/server-tools/instance-manager/Makefile.am index c2bf501eca7..c9c9009a8ec 100644 --- a/server-tools/instance-manager/Makefile.am +++ b/server-tools/instance-manager/Makefile.am @@ -14,7 +14,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -INCLUDES= -I$(top_srcdir)/include -I$(top_srcdir)/extra +INCLUDES= -I$(top_srcdir)/include -I$(top_builddir)/include DEFS= -DMYSQL_INSTANCE_MANAGER -DMYSQL_SERVER diff --git a/sql/Makefile.am b/sql/Makefile.am index 8ff55898ba4..3c520ac971c 100644 --- a/sql/Makefile.am +++ b/sql/Makefile.am @@ -22,7 +22,7 @@ MYSQLBASEdir= $(prefix) INCLUDES = @MT_INCLUDES@ @ZLIB_INCLUDES@ \ @bdb_includes@ @innodb_includes@ @ndbcluster_includes@ \ -I$(top_srcdir)/include -I$(top_srcdir)/regex \ - -I$(srcdir) $(openssl_includes) -I$(top_srcdir)/extra + -I$(srcdir) $(openssl_includes) -I$(top_builddir)/include WRAPLIBS= @WRAPLIBS@ SUBDIRS = share libexec_PROGRAMS = mysqld @@ -115,6 +115,7 @@ DEFS = -DMYSQL_SERVER \ # Don't put lex_hash.h in BUILT_SOURCES as this will give infinite recursion BUILT_SOURCES = sql_yacc.cc sql_yacc.h EXTRA_DIST = udf_example.cc $(BUILT_SOURCES) +DISTCLEANFILES = lex_hash.h AM_YFLAGS = -d mysql_tzinfo_to_sql.cc: @@ -160,8 +161,5 @@ sql_lex.o: lex_hash.h udf_example.so: udf_example.cc $(CXXCOMPILE) -shared -o $@ $< -distclean: - rm -f lex_hash.h - # Don't update the files from bitkeeper %::SCCS/s.% diff --git a/sql/share/Makefile.am b/sql/share/Makefile.am index cfbbb36c489..608bbdb7ae6 100644 --- a/sql/share/Makefile.am +++ b/sql/share/Makefile.am @@ -14,10 +14,11 @@ dist-hook: all: english/errmsg.sys # Use the english errmsg.sys as a flag that all errmsg.sys needs to be -# created. Normally these are created by extra/Makefile.am +# created. Normally these are created by extra/Makefile english/errmsg.sys: errmsg.txt - $(top_builddir)/extra/comp_err --charset=$(srcdir)/charsets --out-dir=$(top_builddir)/sql/share/ --header_file=$(top_builddir)/extra/mysqld_error.h --state_file=$(top_builddir)/extra/sql_state.h --in_file=errmsg.txt + rm $(top_builddir)/include/mysqld_error.h + (cd $(top_builddir)/extra && $(MAKE)) install-data-local: for lang in @AVAILABLE_LANGUAGES@; \ diff --git a/tools/Makefile.am b/tools/Makefile.am index 55801c22c48..1cb07f85e5a 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -16,7 +16,7 @@ # Process this file with automake to create Makefile.in INCLUDES=@MT_INCLUDES@ -I$(top_srcdir)/include $(openssl_includes) \ - -I$(top_srcdir)/extra + -I$(top_builddir)/include LDADD= @CLIENT_EXTRA_LDFLAGS@ @openssl_libs@ \ $(top_builddir)/libmysql_r/libmysqlclient_r.la @ZLIB_LIBS@ bin_PROGRAMS= mysqlmanager From 896e2747b77da80b7bc320c445bec7ed5e7692b2 Mon Sep 17 00:00:00 2001 From: "serg@serg.mylan" <> Date: Fri, 28 Jan 2005 19:03:07 +0100 Subject: [PATCH 10/11] there's no need to define UNIV_DEBUG explicitly anymore --- configure.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index 124e1ce3dcc..b2d8d65439d 100644 --- a/configure.in +++ b/configure.in @@ -1674,8 +1674,8 @@ then elif test "$with_debug" = "full" then # Full debug. Very slow in some cases - CFLAGS="$DEBUG_CFLAGS -DDBUG_ON -DSAFE_MUTEX -DSAFEMALLOC -DUNIV_DEBUG $CFLAGS" - CXXFLAGS="$DEBUG_CXXFLAGS -DDBUG_ON -DSAFE_MUTEX -DSAFEMALLOC -DUNIV_DEBUG $CXXFLAGS" + CFLAGS="$DEBUG_CFLAGS -DDBUG_ON -DSAFE_MUTEX -DSAFEMALLOC $CFLAGS" + CXXFLAGS="$DEBUG_CXXFLAGS -DDBUG_ON -DSAFE_MUTEX -DSAFEMALLOC $CXXFLAGS" else # Optimized version. No debug CFLAGS="$OPTIMIZE_CFLAGS -DDBUG_OFF $CFLAGS" From 0c8186953766d7ee6c9c19b88464caaef1835902 Mon Sep 17 00:00:00 2001 From: "tulin@mysql.com" <> Date: Fri, 28 Jan 2005 19:28:14 +0100 Subject: [PATCH 11/11] ndb_opt_defaults.h: removed usage of SIGRTMIN temorarilly as it causes problems on some platforms --- BitKeeper/etc/logging_ok | 1 + ndb/include/ndbapi/ndb_opt_defaults.h | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok index fe2a38f29bf..6f99987bd9b 100644 --- a/BitKeeper/etc/logging_ok +++ b/BitKeeper/etc/logging_ok @@ -241,6 +241,7 @@ tonu@x153.internalnet tonu@x3.internalnet tsmith@build.mysql.com tulin@build.mysql.com +tulin@mysql.com ulli@morbus.(none) venu@hundin.mysql.fi venu@myvenu.com diff --git a/ndb/include/ndbapi/ndb_opt_defaults.h b/ndb/include/ndbapi/ndb_opt_defaults.h index 63b673ed60d..d03a9dcc36f 100644 --- a/ndb/include/ndbapi/ndb_opt_defaults.h +++ b/ndb/include/ndbapi/ndb_opt_defaults.h @@ -17,11 +17,7 @@ #ifndef NDB_OPT_DEFAULTS_H #define NDB_OPT_DEFAULTS_H -#ifdef SIGRTMIN -#define OPT_NDB_SHM_SIGNUM_DEFAULT SIGRTMIN+2 -#else #define OPT_NDB_SHM_SIGNUM_DEFAULT 0 -#endif #define OPT_NDB_SHM_DEFAULT 0 #endif