[Pkg-mysql-commits] r1299 - in branches/experimental-5.0/debian: . patches
Norbert Tretkowski
nobse at alioth.debian.org
Sun Aug 10 06:04:38 UTC 2008
Author: nobse
Date: 2008-08-10 06:04:37 +0000 (Sun, 10 Aug 2008)
New Revision: 1299
Removed:
branches/experimental-5.0/debian/patches/50_fix_mysqldump.dpatch
branches/experimental-5.0/debian/patches/51_incorrect-order.dpatch
branches/experimental-5.0/debian/patches/52_ndb-gcc-4.2.dpatch
branches/experimental-5.0/debian/patches/53_integer-gcc-4.2.dpatch
branches/experimental-5.0/debian/patches/54_ssl-client-support.dpatch
branches/experimental-5.0/debian/patches/55_testsuite-2008.dpatch
branches/experimental-5.0/debian/patches/56_fix_order_by.dpatch
branches/experimental-5.0/debian/patches/57_fix_mysql_replication.dpatch
branches/experimental-5.0/debian/patches/58_disable-ndb-backup-print.dpatch
branches/experimental-5.0/debian/patches/90_upstreamdebiandir.dpatch
branches/experimental-5.0/debian/patches/91_SECURITY_CVE-2007-5925.dpatch
branches/experimental-5.0/debian/patches/92_SECURITY_CVE-2008-2079.dpatch
Modified:
branches/experimental-5.0/debian/changelog
Log:
New upstream release.
Modified: branches/experimental-5.0/debian/changelog
===================================================================
--- branches/experimental-5.0/debian/changelog 2008-08-10 05:48:00 UTC (rev 1298)
+++ branches/experimental-5.0/debian/changelog 2008-08-10 06:04:37 UTC (rev 1299)
@@ -1,3 +1,22 @@
+mysql-dfsg-5.0 (5.0.67-1) experimental; urgency=low
+
+ * New upstream release.
+ * Remove patches:
+ + debian/patches/50_fix_mysqldump.dpatch
+ + debian/patches/51_incorrect-order.dpatch
+ + debian/patches/52_ndb-gcc-4.2.dpatch
+ + debian/patches/53_integer-gcc-4.2.dpatch
+ + debian/patches/54_ssl-client-support.dpatch
+ + debian/patches/55_testsuite-2008.dpatch
+ + debian/patches/56_fix_order_by.dpatch
+ + debian/patches/57_fix_mysql_replication.dpatch
+ + debian/patches/58_disable-ndb-backup-print.dpatch
+ + debian/patches/90_upstreamdebiandir.dpatch
+ + debian/patches/91_SECURITY_CVE-2007-5925.dpatch
+ + debian/patches/92_SECURITY_CVE-2008-2079.dpatch
+
+ -- Norbert Tretkowski <nobse at debian.org> Sun, 10 Aug 2008 07:55:41 +0200
+
mysql-dfsg-5.0 (5.0.51a-12) unstable; urgency=low
* Disable rpl_ndb_innodb_trans test when running the testsuite, fails
Deleted: branches/experimental-5.0/debian/patches/50_fix_mysqldump.dpatch
===================================================================
--- branches/experimental-5.0/debian/patches/50_fix_mysqldump.dpatch 2008-08-10 05:48:00 UTC (rev 1298)
+++ branches/experimental-5.0/debian/patches/50_fix_mysqldump.dpatch 2008-08-10 06:04:37 UTC (rev 1299)
@@ -1,55 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 50_fix_mysqldump.dpatch by Norbert Tretkowski <nobse at debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: SHOW FIELDS FROM a view with no valid definer was possible (since fix
-## DP: for Bug#26817), but gave NULL as a field-type. This led to mysqldump-ing
-## DP: of such views being successful, but loading such a dump with the client
-## DP: failing. Patch allows SHOW FIELDS to give data-type of field in underlying
-## DP: table.
-
- at DPATCH@
-diff -Nrup a/mysql-test/r/information_schema_db.result b/mysql-test/r/information_schema_db.result
---- a/mysql-test/r/information_schema_db.result 2007-08-20 08:23:06 +02:00
-+++ b/mysql-test/r/information_schema_db.result 2007-10-26 09:01:28 +02:00
-@@ -130,7 +130,7 @@ Warnings:
- Warning 1356 View 'testdb_1.v7' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
- show fields from testdb_1.v7;
- Field Type Null Key Default Extra
--f1 null YES NULL
-+f1 char(4) YES NULL
- Warnings:
- Note 1449 There is no 'no_such_user'@'no_such_host' registered
- create table t3 (f1 char(4), f2 char(4));
-@@ -150,7 +150,7 @@ View Create View
- v6 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `testdb_1`.`v6` AS select `testdb_1`.`t1`.`f1` AS `f1` from `testdb_1`.`t1`
- show fields from testdb_1.v7;
- Field Type Null Key Default Extra
--f1 null YES NULL
-+f1 char(4) YES NULL
- Warnings:
- Note 1449 There is no 'no_such_user'@'no_such_host' registered
- show create view testdb_1.v7;
-@@ -178,7 +178,7 @@ show create view v4;
- ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
- show fields from v4;
- Field Type Null Key Default Extra
--f1 null YES NULL
-+f1 char(4) YES NULL
- f2 char(4) YES NULL
- show fields from v2;
- Field Type Null Key Default Extra
-diff -Nrup a/sql/sql_base.cc b/sql/sql_base.cc
---- a/sql/sql_base.cc 2007-09-27 11:17:13 +02:00
-+++ b/sql/sql_base.cc 2007-10-26 09:01:28 +02:00
-@@ -3958,7 +3958,9 @@ find_field_in_tables(THD *thd, Item_iden
- {
- Field *cur_field= find_field_in_table_ref(thd, cur_table, name, length,
- item->name, db, table_name, ref,
-- check_privileges,
-+ (thd->lex->sql_command ==
-+ SQLCOM_SHOW_FIELDS)
-+ ? false : check_privileges,
- allow_rowid,
- &(item->cached_field_index),
- register_tree_change,
Deleted: branches/experimental-5.0/debian/patches/51_incorrect-order.dpatch
===================================================================
--- branches/experimental-5.0/debian/patches/51_incorrect-order.dpatch 2008-08-10 05:48:00 UTC (rev 1298)
+++ branches/experimental-5.0/debian/patches/51_incorrect-order.dpatch 2008-08-10 06:04:37 UTC (rev 1299)
@@ -1,115 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 51_incorrect-order.dpatch by Norbert Tretkowski <nobse at debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: http://lists.mysql.com/commits/37246
-
- at DPATCH@
-diff -Nrup a/mysql-test/r/select.result b/mysql-test/r/select.result
---- a/mysql-test/r/select.result 2007-09-13 17:31:07 +04:00
-+++ b/mysql-test/r/select.result 2007-11-07 14:00:41 +03:00
-@@ -4096,4 +4096,43 @@ SELECT `x` FROM v3;
- x
- 1
- DROP VIEW v1, v2, v3;
-+CREATE TABLE t1 (c11 INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY);
-+CREATE TABLE t2 (c21 INT UNSIGNED NOT NULL,
-+c22 INT DEFAULT NULL,
-+KEY(c21, c22));
-+CREATE TABLE t3 (c31 INT UNSIGNED NOT NULL DEFAULT 0,
-+c32 INT DEFAULT NULL,
-+c33 INT NOT NULL,
-+c34 INT UNSIGNED DEFAULT 0,
-+KEY (c33, c34, c32));
-+INSERT INTO t1 values (),(),(),(),();
-+INSERT INTO t2 SELECT a.c11, b.c11 FROM t1 a, t1 b;
-+INSERT INTO t3 VALUES (1, 1, 1, 0),
-+(2, 2, 0, 0),
-+(3, 3, 1, 0),
-+(4, 4, 0, 0),
-+(5, 5, 1, 0);
-+SELECT c32 FROM t1, t2, t3 WHERE t1.c11 IN (1, 3, 5) AND
-+t3.c31 = t1.c11 AND t2.c21 = t1.c11 AND
-+t3.c33 = 1 AND t2.c22 in (1, 3)
-+ORDER BY c32;
-+c32
-+1
-+1
-+3
-+3
-+5
-+5
-+SELECT c32 FROM t1, t2, t3 WHERE t1.c11 IN (1, 3, 5) AND
-+t3.c31 = t1.c11 AND t2.c21 = t1.c11 AND
-+t3.c33 = 1 AND t2.c22 in (1, 3)
-+ORDER BY c32 DESC;
-+c32
-+5
-+5
-+3
-+3
-+1
-+1
-+DROP TABLE t1, t2, t3;
- End of 5.0 tests
-diff -Nrup a/mysql-test/t/select.test b/mysql-test/t/select.test
---- a/mysql-test/t/select.test 2007-09-15 09:02:02 +04:00
-+++ b/mysql-test/t/select.test 2007-11-07 14:00:41 +03:00
-@@ -3484,4 +3484,40 @@ DROP VIEW v1, v2, v3;
-
- --enable_ps_protocol
-
-+#
-+# Bug #30666: Incorrect order when using range conditions on 2 tables or more
-+#
-+
-+CREATE TABLE t1 (c11 INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY);
-+CREATE TABLE t2 (c21 INT UNSIGNED NOT NULL,
-+ c22 INT DEFAULT NULL,
-+ KEY(c21, c22));
-+CREATE TABLE t3 (c31 INT UNSIGNED NOT NULL DEFAULT 0,
-+ c32 INT DEFAULT NULL,
-+ c33 INT NOT NULL,
-+ c34 INT UNSIGNED DEFAULT 0,
-+ KEY (c33, c34, c32));
-+
-+INSERT INTO t1 values (),(),(),(),();
-+INSERT INTO t2 SELECT a.c11, b.c11 FROM t1 a, t1 b;
-+INSERT INTO t3 VALUES (1, 1, 1, 0),
-+ (2, 2, 0, 0),
-+ (3, 3, 1, 0),
-+ (4, 4, 0, 0),
-+ (5, 5, 1, 0);
-+
-+# Show that ORDER BY produces the correct results order
-+SELECT c32 FROM t1, t2, t3 WHERE t1.c11 IN (1, 3, 5) AND
-+ t3.c31 = t1.c11 AND t2.c21 = t1.c11 AND
-+ t3.c33 = 1 AND t2.c22 in (1, 3)
-+ ORDER BY c32;
-+
-+# Show that ORDER BY DESC produces the correct results order
-+SELECT c32 FROM t1, t2, t3 WHERE t1.c11 IN (1, 3, 5) AND
-+ t3.c31 = t1.c11 AND t2.c21 = t1.c11 AND
-+ t3.c33 = 1 AND t2.c22 in (1, 3)
-+ ORDER BY c32 DESC;
-+
-+DROP TABLE t1, t2, t3;
-+
- --echo End of 5.0 tests
-diff -Nrup a/sql/sql_select.cc b/sql/sql_select.cc
---- a/sql/sql_select.cc 2007-10-02 18:45:48 +04:00
-+++ b/sql/sql_select.cc 2007-11-07 14:00:42 +03:00
-@@ -6071,10 +6071,9 @@ make_join_readinfo(JOIN *join, ulonglong
- ordered. If there is a temp table the ordering is done as a last
- operation and doesn't prevent join cache usage.
- */
-- if (!ordered_set && !join->need_tmp &&
-- ((table == join->sort_by_table &&
-- (!join->order || join->skip_sort_order)) ||
-- (join->sort_by_table == (TABLE *) 1 && i != join->const_tables)))
-+ if (!ordered_set && !join->need_tmp &&
-+ (table == join->sort_by_table ||
-+ (join->sort_by_table == (TABLE *) 1 && i != join->const_tables)))
- ordered_set= 1;
-
- switch (tab->type) {
Deleted: branches/experimental-5.0/debian/patches/52_ndb-gcc-4.2.dpatch
===================================================================
--- branches/experimental-5.0/debian/patches/52_ndb-gcc-4.2.dpatch 2008-08-10 05:48:00 UTC (rev 1298)
+++ branches/experimental-5.0/debian/patches/52_ndb-gcc-4.2.dpatch 2008-08-10 06:04:37 UTC (rev 1299)
@@ -1,153 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 52_ndb-gcc-4.2.dpatch by Norbert Tretkowski <nobse at debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: http://bugs.mysql.com/bug.php?id=31761
-
- at DPATCH@
---- 1.8/ndb/include/kernel/AttributeHeader.hpp 2007-10-23 16:46:03 +02:00
-+++ 1.9/ndb/include/kernel/AttributeHeader.hpp 2007-10-23 16:46:03 +02:00
-@@ -41,8 +41,7 @@ public:
- STATIC_CONST( FRAGMENT_MEMORY= 0xFFF9 );
-
- /** Initialize AttributeHeader at location aHeaderPtr */
-- static AttributeHeader& init(void* aHeaderPtr, Uint32 anAttributeId,
-- Uint32 aDataSize);
-+ static void init(Uint32* aHeaderPtr, Uint32 anAttributeId, Uint32 aDataSize);
-
- /** Returns size of AttributeHeader (usually one or two words) */
- Uint32 getHeaderSize() const; // In 32-bit words
-@@ -100,10 +99,11 @@ public:
- */
-
- inline
--AttributeHeader& AttributeHeader::init(void* aHeaderPtr, Uint32 anAttributeId,
-- Uint32 aDataSize)
-+void AttributeHeader::init(Uint32* aHeaderPtr, Uint32 anAttributeId,
-+ Uint32 aDataSize)
- {
-- return * new (aHeaderPtr) AttributeHeader(anAttributeId, aDataSize);
-+ AttributeHeader ah(anAttributeId, aDataSize);
-+ *aHeaderPtr = ah.m_value;
- }
-
- inline
-
---- 1.25/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp 2007-10-23 16:46:03 +02:00
-+++ 1.26/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp 2007-10-23 16:46:03 +02:00
-@@ -1577,8 +1577,8 @@ int Dbtup::interpreterNextLab(Signal* si
- Uint32 TdataForUpdate[3];
- Uint32 Tlen;
-
-- AttributeHeader& ah = AttributeHeader::init(&TdataForUpdate[0],
-- TattrId, TattrNoOfWords);
-+ AttributeHeader ah(TattrId, TattrNoOfWords);
-+ TdataForUpdate[0] = ah.m_value;
- TdataForUpdate[1] = TregMemBuffer[theRegister + 2];
- TdataForUpdate[2] = TregMemBuffer[theRegister + 3];
- Tlen = TattrNoOfWords + 1;
-@@ -1594,6 +1594,7 @@ int Dbtup::interpreterNextLab(Signal* si
- // Write a NULL value into the attribute
- /* --------------------------------------------------------- */
- ah.setNULL();
-+ TdataForUpdate[0] = ah.m_value;
- Tlen = 1;
- }//if
- int TnoDataRW= updateAttributes(pagePtr,
-
---- 1.20/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp 2007-10-23 16:46:03 +02:00
-+++ 1.21/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp 2007-10-23 16:46:03 +02:00
-@@ -676,8 +676,6 @@ bool
- Dbtup::checkUpdateOfPrimaryKey(Uint32* updateBuffer, Tablerec* const regTabPtr)
- {
- Uint32 keyReadBuffer[MAX_KEY_SIZE_IN_WORDS];
-- Uint32 attributeHeader;
-- AttributeHeader* ahOut = (AttributeHeader*)&attributeHeader;
- AttributeHeader ahIn(*updateBuffer);
- Uint32 attributeId = ahIn.getAttributeId();
- Uint32 attrDescriptorIndex = regTabPtr->tabDescriptor + (attributeId << ZAD_LOG_SIZE);
-@@ -700,16 +698,17 @@ Dbtup::checkUpdateOfPrimaryKey(Uint32* u
-
- ReadFunction f = regTabPtr->readFunctionArray[attributeId];
-
-- AttributeHeader::init(&attributeHeader, attributeId, 0);
-+ AttributeHeader attributeHeader(attributeId, 0);
- tOutBufIndex = 0;
- tMaxRead = MAX_KEY_SIZE_IN_WORDS;
-
- bool tmp = tXfrmFlag;
- tXfrmFlag = true;
-- ndbrequire((this->*f)(&keyReadBuffer[0], ahOut, attrDescriptor, attributeOffset));
-+ ndbrequire((this->*f)(&keyReadBuffer[0], &attributeHeader, attrDescriptor,
-+ attributeOffset));
- tXfrmFlag = tmp;
-- ndbrequire(tOutBufIndex == ahOut->getDataSize());
-- if (ahIn.getDataSize() != ahOut->getDataSize()) {
-+ ndbrequire(tOutBufIndex == attributeHeader.getDataSize());
-+ if (ahIn.getDataSize() != attributeHeader.getDataSize()) {
- ljam();
- return true;
- }//if
-
---- 1.13/ndb/src/kernel/blocks/dbutil/DbUtil.cpp 2007-10-23 16:46:03 +02:00
-+++ 1.14/ndb/src/kernel/blocks/dbutil/DbUtil.cpp 2007-10-23 16:46:03 +02:00
-@@ -1168,9 +1168,7 @@ DbUtil::prepareOperation(Signal* signal,
- /**************************************************************
- * Attribute found - store in mapping (AttributeId, Position)
- **************************************************************/
-- AttributeHeader & attrMap =
-- AttributeHeader::init(attrMappingIt.data,
-- attrDesc.AttributeId, // 1. Store AttrId
-+ AttributeHeader attrMap(attrDesc.AttributeId, // 1. Store AttrId
- 0);
-
- if (attrDesc.AttributeKeyFlag) {
-@@ -1199,6 +1197,7 @@ DbUtil::prepareOperation(Signal* signal,
- return;
- }
- }
-+ *(attrMappingIt.data) = attrMap.m_value;
- #if 0
- ndbout << "BEFORE: attrLength: " << attrLength << endl;
- #endif
-
---- 1.24/ndb/src/ndbapi/NdbOperationDefine.cpp 2007-10-23 16:46:03 +02:00
-+++ 1.25/ndb/src/ndbapi/NdbOperationDefine.cpp 2007-10-23 16:46:03 +02:00
-@@ -392,9 +392,8 @@ NdbOperation::getValue_impl(const NdbCol
- return NULL;
- }//if
- }//if
-- Uint32 ah;
-- AttributeHeader::init(&ah, tAttrInfo->m_attrId, 0);
-- if (insertATTRINFO(ah) != -1) {
-+ AttributeHeader ah(tAttrInfo->m_attrId, 0);
-+ if (insertATTRINFO(ah.m_value) != -1) {
- // Insert Attribute Id into ATTRINFO part.
-
- /************************************************************************
-@@ -525,12 +524,11 @@ NdbOperation::setValue( const NdbColumnI
-
- tAttrId = tAttrInfo->m_attrId;
- const char *aValue = aValuePassed;
-- Uint32 ahValue;
- if (aValue == NULL) {
- if (tAttrInfo->m_nullable) {
-- AttributeHeader& ah = AttributeHeader::init(&ahValue, tAttrId, 0);
-+ AttributeHeader ah(tAttrId, 0);
- ah.setNULL();
-- insertATTRINFO(ahValue);
-+ insertATTRINFO(ah.m_value);
- // Insert Attribute Id with the value
- // NULL into ATTRINFO part.
- DBUG_RETURN(0);
-@@ -563,8 +561,8 @@ NdbOperation::setValue( const NdbColumnI
- }//if
- const Uint32 totalSizeInWords = (sizeInBytes + 3)/4; // Including bits in last word
- const Uint32 sizeInWords = sizeInBytes / 4; // Excluding bits in last word
-- (void) AttributeHeader::init(&ahValue, tAttrId, totalSizeInWords);
-- insertATTRINFO( ahValue );
-+ AttributeHeader ah(tAttrId, totalSizeInWords);
-+ insertATTRINFO( ah.m_value );
-
- /***********************************************************************
- * Check if the pointer of the value passed is aligned on a 4 byte boundary.
Deleted: branches/experimental-5.0/debian/patches/53_integer-gcc-4.2.dpatch
===================================================================
--- branches/experimental-5.0/debian/patches/53_integer-gcc-4.2.dpatch 2008-08-10 05:48:00 UTC (rev 1298)
+++ branches/experimental-5.0/debian/patches/53_integer-gcc-4.2.dpatch 2008-08-10 06:04:37 UTC (rev 1299)
@@ -1,303 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 53_integer-gcc-4.2.dpatch by Norbert Tretkowski <nobse at debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: http://bugs.mysql.com/bug.php?id=31799
-
- at DPATCH@
---- 1.9/strings/int2str.c 2007-10-24 09:26:32 +02:00
-+++ 1.10/strings/int2str.c 2007-10-24 09:26:32 +02:00
-@@ -57,6 +57,7 @@ int2str(register long int val, register
- register char *p;
- long int new_val;
- char *dig_vec= upcase ? _dig_vec_upper : _dig_vec_lower;
-+ ulong uval= (ulong) val;
-
- if (radix < 0)
- {
-@@ -65,7 +66,8 @@ int2str(register long int val, register
- if (val < 0)
- {
- *dst++ = '-';
-- val = -val;
-+ /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */
-+ uval = (ulong)0 - uval;
- }
- radix = -radix;
- }
-@@ -86,8 +88,8 @@ int2str(register long int val, register
- */
- p = &buffer[sizeof(buffer)-1];
- *p = '\0';
-- new_val=(ulong) val / (ulong) radix;
-- *--p = dig_vec[(uchar) ((ulong) val- (ulong) new_val*(ulong) radix)];
-+ new_val= uval / (ulong) radix;
-+ *--p = dig_vec[(uchar) (uval- (ulong) new_val*(ulong) radix)];
- val = new_val;
- #ifdef HAVE_LDIV
- while (val != 0)
-@@ -133,20 +135,22 @@ char *int10_to_str(long int val,char *ds
- char buffer[65];
- register char *p;
- long int new_val;
-+ unsigned long int uval = (unsigned long int) val;
-
- if (radix < 0) /* -10 */
- {
- if (val < 0)
- {
- *dst++ = '-';
-- val = -val;
-+ /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */
-+ uval = (unsigned long int)0 - uval;
- }
- }
-
- p = &buffer[sizeof(buffer)-1];
- *p = '\0';
-- new_val= (long) ((unsigned long int) val / 10);
-- *--p = '0'+ (char) ((unsigned long int) val - (unsigned long) new_val * 10);
-+ new_val= (long) (uval / 10);
-+ *--p = '0'+ (char) (uval - (unsigned long) new_val * 10);
- val = new_val;
-
- while (val != 0)
-
---- 1.9/strings/longlong2str.c 2007-10-24 09:26:32 +02:00
-+++ 1.10/strings/longlong2str.c 2007-10-24 09:26:32 +02:00
-@@ -51,13 +51,15 @@ char *longlong2str(longlong val,char *ds
- char buffer[65];
- register char *p;
- long long_val;
-+ ulonglong uval= (ulonglong) val;
-
- if (radix < 0)
- {
- if (radix < -36 || radix > -2) return (char*) 0;
- if (val < 0) {
- *dst++ = '-';
-- val = -val;
-+ /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */
-+ uval = (ulonglong)0 - uval;
- }
- radix = -radix;
- }
-@@ -65,7 +67,7 @@ char *longlong2str(longlong val,char *ds
- {
- if (radix > 36 || radix < 2) return (char*) 0;
- }
-- if (val == 0)
-+ if (uval == 0)
- {
- *dst++='0';
- *dst='\0';
-@@ -74,14 +76,14 @@ char *longlong2str(longlong val,char *ds
- p = &buffer[sizeof(buffer)-1];
- *p = '\0';
-
-- while ((ulonglong) val > (ulonglong) LONG_MAX)
-+ while (uval > (ulonglong) LONG_MAX)
- {
-- ulonglong quo=(ulonglong) val/(uint) radix;
-- uint rem= (uint) (val- quo* (uint) radix);
-+ ulonglong quo= uval/(uint) radix;
-+ uint rem= (uint) (uval- quo* (uint) radix);
- *--p = _dig_vec_upper[rem];
-- val= quo;
-+ uval= quo;
- }
-- long_val= (long) val;
-+ long_val= (long) uval;
- while (long_val != 0)
- {
- long quo= long_val/radix;
-@@ -100,17 +102,19 @@ char *longlong10_to_str(longlong val,cha
- char buffer[65];
- register char *p;
- long long_val;
-+ ulonglong uval= (ulonglong) val;
-
- if (radix < 0)
- {
- if (val < 0)
- {
- *dst++ = '-';
-- val = -val;
-+ /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */
-+ uval = (ulonglong)0 - uval;
- }
- }
-
-- if (val == 0)
-+ if (uval == 0)
- {
- *dst++='0';
- *dst='\0';
-@@ -119,14 +123,14 @@ char *longlong10_to_str(longlong val,cha
- p = &buffer[sizeof(buffer)-1];
- *p = '\0';
-
-- while ((ulonglong) val > (ulonglong) LONG_MAX)
-+ while (uval > (ulonglong) LONG_MAX)
- {
-- ulonglong quo=(ulonglong) val/(uint) 10;
-- uint rem= (uint) (val- quo* (uint) 10);
-+ ulonglong quo= uval/(uint) 10;
-+ uint rem= (uint) (uval- quo* (uint) 10);
- *--p = _dig_vec_upper[rem];
-- val= quo;
-+ uval= quo;
- }
-- long_val= (long) val;
-+ long_val= (long) uval;
- while (long_val != 0)
- {
- long quo= long_val/10;
-
---- 1.65/strings/ctype-ucs2.c 2007-10-24 09:26:32 +02:00
-+++ 1.66/strings/ctype-ucs2.c 2007-10-24 09:26:32 +02:00
-@@ -1018,6 +1018,7 @@ int my_l10tostr_ucs2(CHARSET_INFO *cs,
- register char *p, *db, *de;
- long int new_val;
- int sl=0;
-+ unsigned long int uval = (unsigned long int) val;
-
- p = &buffer[sizeof(buffer)-1];
- *p='\0';
-@@ -1027,12 +1028,13 @@ int my_l10tostr_ucs2(CHARSET_INFO *cs,
- if (val < 0)
- {
- sl = 1;
-- val = -val;
-+ /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */
-+ uval = (unsigned long int)0 - uval;
- }
- }
-
-- new_val = (long) ((unsigned long int) val / 10);
-- *--p = '0'+ (char) ((unsigned long int) val - (unsigned long) new_val * 10);
-+ new_val = (long) (uval / 10);
-+ *--p = '0'+ (char) (uval - (unsigned long) new_val * 10);
- val = new_val;
-
- while (val != 0)
-@@ -1065,34 +1067,36 @@ int my_ll10tostr_ucs2(CHARSET_INFO *cs _
- register char *p, *db, *de;
- long long_val;
- int sl=0;
-+ ulonglong uval= (ulonglong) val;
-
- if (radix < 0)
- {
- if (val < 0)
- {
- sl=1;
-- val = -val;
-+ /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */
-+ uval = (ulonglong)0 - uval;
- }
- }
-
- p = &buffer[sizeof(buffer)-1];
- *p='\0';
-
-- if (val == 0)
-+ if (uval == 0)
- {
- *--p='0';
- goto cnv;
- }
-
-- while ((ulonglong) val > (ulonglong) LONG_MAX)
-+ while (uval > (ulonglong) LONG_MAX)
- {
-- ulonglong quo=(ulonglong) val/(uint) 10;
-- uint rem= (uint) (val- quo* (uint) 10);
-+ ulonglong quo= uval/(uint) 10;
-+ uint rem= (uint) (uval- quo* (uint) 10);
- *--p = '0' + rem;
-- val= quo;
-+ uval= quo;
- }
-
-- long_val= (long) val;
-+ long_val= (long) uval;
- while (long_val != 0)
- {
- long quo= long_val/10;
-
---- 1.82/strings/ctype-simple.c 2007-10-24 09:26:32 +02:00
-+++ 1.83/strings/ctype-simple.c 2007-10-24 09:26:32 +02:00
-@@ -837,6 +837,7 @@ int my_long10_to_str_8bit(CHARSET_INFO *
- register char *p, *e;
- long int new_val;
- uint sign=0;
-+ unsigned long int uval = (unsigned long int) val;
-
- e = p = &buffer[sizeof(buffer)-1];
- *p= 0;
-@@ -845,15 +846,16 @@ int my_long10_to_str_8bit(CHARSET_INFO *
- {
- if (val < 0)
- {
-- val= -val;
-+ /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */
-+ uval= (unsigned long int)0 - uval;
- *dst++= '-';
- len--;
- sign= 1;
- }
- }
-
-- new_val = (long) ((unsigned long int) val / 10);
-- *--p = '0'+ (char) ((unsigned long int) val - (unsigned long) new_val * 10);
-+ new_val = (long) (uval / 10);
-+ *--p = '0'+ (char) (uval - (unsigned long) new_val * 10);
- val = new_val;
-
- while (val != 0)
-@@ -876,12 +878,14 @@ int my_longlong10_to_str_8bit(CHARSET_IN
- register char *p, *e;
- long long_val;
- uint sign= 0;
-+ ulonglong uval = (ulonglong)val;
-
- if (radix < 0)
- {
- if (val < 0)
- {
-- val = -val;
-+ /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */
-+ uval = (ulonglong)0 - uval;
- *dst++= '-';
- len--;
- sign= 1;
-@@ -891,22 +895,22 @@ int my_longlong10_to_str_8bit(CHARSET_IN
- e = p = &buffer[sizeof(buffer)-1];
- *p= 0;
-
-- if (val == 0)
-+ if (uval == 0)
- {
- *--p= '0';
- len= 1;
- goto cnv;
- }
-
-- while ((ulonglong) val > (ulonglong) LONG_MAX)
-+ while (uval > (ulonglong) LONG_MAX)
- {
-- ulonglong quo=(ulonglong) val/(uint) 10;
-- uint rem= (uint) (val- quo* (uint) 10);
-+ ulonglong quo= uval/(uint) 10;
-+ uint rem= (uint) (uval- quo* (uint) 10);
- *--p = '0' + rem;
-- val= quo;
-+ uval= quo;
- }
-
-- long_val= (long) val;
-+ long_val= (long) uval;
- while (long_val != 0)
- {
- long quo= long_val/10;
Deleted: branches/experimental-5.0/debian/patches/54_ssl-client-support.dpatch
===================================================================
--- branches/experimental-5.0/debian/patches/54_ssl-client-support.dpatch 2008-08-10 05:48:00 UTC (rev 1298)
+++ branches/experimental-5.0/debian/patches/54_ssl-client-support.dpatch 2008-08-10 06:04:37 UTC (rev 1299)
@@ -1,80 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 54_ssl-client-support.dpatch by Norbert Tretkowski <nobse at debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: http://bugs.mysql.com/bug.php?id=33292
-
- at DPATCH@
-
-diff -Nrup a/vio/viossl.c b/vio/viossl.c
---- a/vio/viossl.c 2007-08-28 11:34:42 +02:00
-+++ b/vio/viossl.c 2008-02-07 08:48:27 +01:00
-@@ -172,20 +172,15 @@ void vio_ssl_delete(Vio *vio)
- vio_delete(vio);
- }
-
--int sslaccept(struct st_VioSSLFd *ptr, Vio *vio, long timeout)
--{
-- DBUG_ENTER("sslaccept");
-- DBUG_RETURN(sslconnect(ptr, vio, timeout));
--}
--
-
--int sslconnect(struct st_VioSSLFd *ptr, Vio *vio, long timeout)
-+static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout,
-+ int (*connect_accept_func)(SSL*))
- {
- SSL *ssl;
- my_bool unused;
- my_bool was_blocking;
-
-- DBUG_ENTER("sslconnect");
-+ DBUG_ENTER("ssl_do");
- DBUG_PRINT("enter", ("ptr: 0x%lx, sd: %d ctx: 0x%lx",
- (long) ptr, vio->sd, (long) ptr->ssl_context));
-
-@@ -204,13 +199,9 @@ int sslconnect(struct st_VioSSLFd *ptr,
- SSL_SESSION_set_timeout(SSL_get_session(ssl), timeout);
- SSL_set_fd(ssl, vio->sd);
-
-- /*
-- SSL_do_handshake will select between SSL_connect
-- or SSL_accept depending on server or client side
-- */
-- if (SSL_do_handshake(ssl) < 1)
-+ if (connect_accept_func(ssl) < 1)
- {
-- DBUG_PRINT("error", ("SSL_do_handshake failure"));
-+ DBUG_PRINT("error", ("SSL_connect/accept failure"));
- report_errors(ssl);
- SSL_free(ssl);
- vio_blocking(vio, was_blocking, &unused);
-@@ -259,6 +250,20 @@ int sslconnect(struct st_VioSSLFd *ptr,
- }
-
-
-+int sslaccept(struct st_VioSSLFd *ptr, Vio *vio, long timeout)
-+{
-+ DBUG_ENTER("sslaccept");
-+ DBUG_RETURN(ssl_do(ptr, vio, timeout, SSL_accept));
-+}
-+
-+
-+int sslconnect(struct st_VioSSLFd *ptr, Vio *vio, long timeout)
-+{
-+ DBUG_ENTER("sslconnect");
-+ DBUG_RETURN(ssl_do(ptr, vio, timeout, SSL_connect));
-+}
-+
-+
- int vio_ssl_blocking(Vio *vio __attribute__((unused)),
- my_bool set_blocking_mode,
- my_bool *old_mode)
-@@ -268,5 +273,7 @@ int vio_ssl_blocking(Vio *vio __attribut
- /* Return error if we try to change to non_blocking mode */
- return (set_blocking_mode ? 0 : 1);
- }
-+
-+
-
- #endif /* HAVE_OPENSSL */
Deleted: branches/experimental-5.0/debian/patches/55_testsuite-2008.dpatch
===================================================================
--- branches/experimental-5.0/debian/patches/55_testsuite-2008.dpatch 2008-08-10 05:48:00 UTC (rev 1298)
+++ branches/experimental-5.0/debian/patches/55_testsuite-2008.dpatch 2008-08-10 06:04:37 UTC (rev 1299)
@@ -1,67 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 55_testsuite-2008.dpatch by Norbert Tretkowski <nobse at debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: http://bugs.mysql.com/bug.php?id=33623
-
- at DPATCH@
-diff -Nrup a/mysql-test/r/view.result b/mysql-test/r/view.result
---- a/mysql-test/r/view.result 2007-09-24 17:34:09 +05:00
-+++ b/mysql-test/r/view.result 2007-10-10 12:16:12 +05:00
-@@ -2706,18 +2706,19 @@ CREATE TABLE t1(
- fName varchar(25) NOT NULL,
- lName varchar(25) NOT NULL,
- DOB date NOT NULL,
-+test_date date NOT NULL,
- uID int unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY);
--INSERT INTO t1(fName, lName, DOB) VALUES
--('Hank', 'Hill', '1964-09-29'),
--('Tom', 'Adams', '1908-02-14'),
--('Homer', 'Simpson', '1968-03-05');
-+INSERT INTO t1(fName, lName, DOB, test_date) VALUES
-+('Hank', 'Hill', '1964-09-29', '2007-01-01'),
-+('Tom', 'Adams', '1908-02-14', '2007-01-01'),
-+('Homer', 'Simpson', '1968-03-05', '2007-01-01');
- CREATE VIEW v1 AS
--SELECT (year(now())-year(DOB)) AS Age
-+SELECT (year(test_date)-year(DOB)) AS Age
- FROM t1 HAVING Age < 75;
- SHOW CREATE VIEW v1;
- View Create View
--v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select (year(now()) - year(`t1`.`DOB`)) AS `Age` from `t1` having (`Age` < 75)
--SELECT (year(now())-year(DOB)) AS Age FROM t1 HAVING Age < 75;
-+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select (year(`t1`.`test_date`) - year(`t1`.`DOB`)) AS `Age` from `t1` having (`Age` < 75)
-+SELECT (year(test_date)-year(DOB)) AS Age FROM t1 HAVING Age < 75;
- Age
- 43
- 39
-diff -Nrup a/mysql-test/t/view.test b/mysql-test/t/view.test
---- a/mysql-test/t/view.test 2007-09-24 17:34:09 +05:00
-+++ b/mysql-test/t/view.test 2007-10-10 12:16:12 +05:00
-@@ -2548,19 +2548,20 @@ CREATE TABLE t1(
- fName varchar(25) NOT NULL,
- lName varchar(25) NOT NULL,
- DOB date NOT NULL,
-+ test_date date NOT NULL,
- uID int unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY);
-
--INSERT INTO t1(fName, lName, DOB) VALUES
-- ('Hank', 'Hill', '1964-09-29'),
-- ('Tom', 'Adams', '1908-02-14'),
-- ('Homer', 'Simpson', '1968-03-05');
-+INSERT INTO t1(fName, lName, DOB, test_date) VALUES
-+ ('Hank', 'Hill', '1964-09-29', '2007-01-01'),
-+ ('Tom', 'Adams', '1908-02-14', '2007-01-01'),
-+ ('Homer', 'Simpson', '1968-03-05', '2007-01-01');
-
- CREATE VIEW v1 AS
-- SELECT (year(now())-year(DOB)) AS Age
-+ SELECT (year(test_date)-year(DOB)) AS Age
- FROM t1 HAVING Age < 75;
- SHOW CREATE VIEW v1;
-
--SELECT (year(now())-year(DOB)) AS Age FROM t1 HAVING Age < 75;
-+SELECT (year(test_date)-year(DOB)) AS Age FROM t1 HAVING Age < 75;
- SELECT * FROM v1;
-
- DROP VIEW v1;
Deleted: branches/experimental-5.0/debian/patches/56_fix_order_by.dpatch
===================================================================
--- branches/experimental-5.0/debian/patches/56_fix_order_by.dpatch 2008-08-10 05:48:00 UTC (rev 1298)
+++ branches/experimental-5.0/debian/patches/56_fix_order_by.dpatch 2008-08-10 06:04:37 UTC (rev 1299)
@@ -1,147 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 56_fix_order_by.dpatch by Jamie Strandboge <jamie at ubuntu.com>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: http://bugs.mysql.com/bug.php?id=32202
-
- at DPATCH@
-diff -urNad mysql-dfsg-5.0-5.0.51a~/mysql-test/r/group_by.result mysql-dfsg-5.0-5.0.51a/mysql-test/r/group_by.result
---- mysql-dfsg-5.0-5.0.51a~/mysql-test/r/group_by.result 2008-01-11 10:23:35.000000000 -0500
-+++ mysql-dfsg-5.0-5.0.51a/mysql-test/r/group_by.result 2008-03-19 16:18:19.000000000 -0400
-@@ -1113,3 +1113,68 @@
- 3 1
- 3 2
- DROP TABLE t1;
-+CREATE TABLE t1(
-+id INT AUTO_INCREMENT PRIMARY KEY,
-+c1 INT NOT NULL,
-+c2 INT NOT NULL,
-+UNIQUE KEY (c2,c1));
-+INSERT INTO t1(c1,c2) VALUES (5,1), (4,1), (3,5), (2,3), (1,3);
-+SELECT * FROM t1 ORDER BY c1;
-+id c1 c2
-+5 1 3
-+4 2 3
-+3 3 5
-+2 4 1
-+1 5 1
-+SELECT * FROM t1 GROUP BY id ORDER BY c1;
-+id c1 c2
-+5 1 3
-+4 2 3
-+3 3 5
-+2 4 1
-+1 5 1
-+SELECT * FROM t1 GROUP BY id ORDER BY id DESC;
-+id c1 c2
-+5 1 3
-+4 2 3
-+3 3 5
-+2 4 1
-+1 5 1
-+SELECT * FROM t1 GROUP BY c2 ,c1, id ORDER BY c2, c1;
-+id c1 c2
-+2 4 1
-+1 5 1
-+5 1 3
-+4 2 3
-+3 3 5
-+SELECT * FROM t1 GROUP BY c2, c1, id ORDER BY c2 DESC, c1;
-+id c1 c2
-+3 3 5
-+5 1 3
-+4 2 3
-+2 4 1
-+1 5 1
-+SELECT * FROM t1 GROUP BY c2, c1, id ORDER BY c2 DESC, c1 DESC;
-+id c1 c2
-+3 3 5
-+4 2 3
-+5 1 3
-+1 5 1
-+2 4 1
-+SELECT * FROM t1 GROUP BY c2 ORDER BY c2, c1;
-+id c1 c2
-+1 5 1
-+4 2 3
-+3 3 5
-+SELECT * FROM t1 GROUP BY c2 ORDER BY c2 DESC, c1;
-+id c1 c2
-+3 3 5
-+4 2 3
-+1 5 1
-+SELECT * FROM t1 GROUP BY c2 ORDER BY c2 DESC, c1 DESC;
-+id c1 c2
-+3 3 5
-+4 2 3
-+1 5 1
-+DROP TABLE t1;
-+End of 5.0 tests
-diff -urNad mysql-dfsg-5.0-5.0.51a~/mysql-test/t/group_by.test mysql-dfsg-5.0-5.0.51a/mysql-test/t/group_by.test
---- mysql-dfsg-5.0-5.0.51a~/mysql-test/t/group_by.test 2008-01-11 10:23:11.000000000 -0500
-+++ mysql-dfsg-5.0-5.0.51a/mysql-test/t/group_by.test 2008-03-19 16:18:19.000000000 -0400
-@@ -815,3 +815,38 @@
- SELECT c,b FROM t1 GROUP BY c,b;
-
- DROP TABLE t1;
-+
-+#
-+# Bug #32202: ORDER BY not working with GROUP BY
-+#
-+
-+CREATE TABLE t1(
-+ id INT AUTO_INCREMENT PRIMARY KEY,
-+ c1 INT NOT NULL,
-+ c2 INT NOT NULL,
-+ UNIQUE KEY (c2,c1));
-+
-+INSERT INTO t1(c1,c2) VALUES (5,1), (4,1), (3,5), (2,3), (1,3);
-+
-+# Show that the test cases from the bug report pass
-+SELECT * FROM t1 ORDER BY c1;
-+SELECT * FROM t1 GROUP BY id ORDER BY c1;
-+
-+# Show that DESC is handled correctly
-+SELECT * FROM t1 GROUP BY id ORDER BY id DESC;
-+
-+# Show that results are correctly ordered when ORDER BY fields
-+# are a subset of GROUP BY ones
-+SELECT * FROM t1 GROUP BY c2 ,c1, id ORDER BY c2, c1;
-+SELECT * FROM t1 GROUP BY c2, c1, id ORDER BY c2 DESC, c1;
-+SELECT * FROM t1 GROUP BY c2, c1, id ORDER BY c2 DESC, c1 DESC;
-+
-+# Show that results are correctly ordered when GROUP BY fields
-+# are a subset of ORDER BY ones
-+SELECT * FROM t1 GROUP BY c2 ORDER BY c2, c1;
-+SELECT * FROM t1 GROUP BY c2 ORDER BY c2 DESC, c1;
-+SELECT * FROM t1 GROUP BY c2 ORDER BY c2 DESC, c1 DESC;
-+
-+DROP TABLE t1;
-+
-+--echo End of 5.0 tests
-diff -urNad mysql-dfsg-5.0-5.0.51a~/sql/sql_select.cc mysql-dfsg-5.0-5.0.51a/sql/sql_select.cc
---- mysql-dfsg-5.0-5.0.51a~/sql/sql_select.cc 2008-03-19 16:18:01.000000000 -0400
-+++ mysql-dfsg-5.0-5.0.51a/sql/sql_select.cc 2008-03-19 16:18:19.000000000 -0400
-@@ -1065,10 +1065,19 @@
- We have found that grouping can be removed since groups correspond to
- only one row anyway, but we still have to guarantee correct result
- order. The line below effectively rewrites the query from GROUP BY
-- <fields> to ORDER BY <fields>. One exception is if skip_sort_order is
-- set (see above), then we can simply skip GROUP BY.
-+ <fields> to ORDER BY <fields>. There are two exceptions:
-+ - if skip_sort_order is set (see above), then we can simply skip
-+ GROUP BY;
-+ - we can only rewrite ORDER BY if the ORDER BY fields are 'compatible'
-+ with the GROUP BY ones, i.e. either one is a prefix of another.
-+ We only check if the ORDER BY is a prefix of GROUP BY. In this case
-+ test_if_subpart() copies the ASC/DESC attributes from the original
-+ ORDER BY fields.
-+ If GROUP BY is a prefix of ORDER BY, then it is safe to leave
-+ 'order' as is.
- */
-- order= skip_sort_order ? 0 : group_list;
-+ if (!order || test_if_subpart(group_list, order))
-+ order= skip_sort_order ? 0 : group_list;
- group_list= 0;
- group= 0;
- }
Deleted: branches/experimental-5.0/debian/patches/57_fix_mysql_replication.dpatch
===================================================================
--- branches/experimental-5.0/debian/patches/57_fix_mysql_replication.dpatch 2008-08-10 05:48:00 UTC (rev 1298)
+++ branches/experimental-5.0/debian/patches/57_fix_mysql_replication.dpatch 2008-08-10 06:04:37 UTC (rev 1299)
@@ -1,53 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 57_fix_mysql_replication.dpatch by Norbert Tretkowski <nobse at debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: http://bugs.mysql.com/bug.php?id=28597
-
- at DPATCH@
-diff -Nrup a/mysql-test/t/rpl_dual_pos_advance.test b/mysql-test/t/rpl_dual_pos_advance.test
---- a/mysql-test/t/rpl_dual_pos_advance.test 2007-03-20 12:15:14 +02:00
-+++ b/mysql-test/t/rpl_dual_pos_advance.test 2007-11-05 17:20:08 +02:00
-@@ -106,9 +106,3 @@ connection slave;
- sync_with_master;
-
- # End of 4.1 tests
--
--# Cleanup
--# The A->B->A replication causes the master to start writing relay logs
--# in var/run, remove them
--remove_file $MYSQLTEST_VARDIR/run/master-relay-bin.000001;
--remove_file $MYSQLTEST_VARDIR/run/master-relay-bin.index;
-diff -Nrup a/mysql-test/t/rpl_temporary.test b/mysql-test/t/rpl_temporary.test
---- a/mysql-test/t/rpl_temporary.test 2007-02-27 15:54:31 +02:00
-+++ b/mysql-test/t/rpl_temporary.test 2007-11-05 17:20:08 +02:00
-@@ -211,6 +211,8 @@ select * from t1;
- connection master;
- drop table t1;
-
-+--remove_file $MYSQLTEST_VARDIR/tmp/bug14157.sql
-+
- # Delete the anonymous users
- source include/delete_anonymous_users.inc;
-
-diff -Nrup a/sql/log.cc b/sql/log.cc
---- a/sql/log.cc 2007-07-30 18:27:30 +03:00
-+++ b/sql/log.cc 2007-11-05 17:20:08 +02:00
-@@ -448,13 +448,10 @@ const char *MYSQL_LOG::generate_name(con
- {
- if (!log_name || !log_name[0])
- {
-- /*
-- TODO: The following should be using fn_format(); We just need to
-- first change fn_format() to cut the file name if it's too long.
-- */
-- strmake(buff, pidfile_name,FN_REFLEN-5);
-- strmov(fn_ext(buff),suffix);
-- return (const char *)buff;
-+ strmake(buff, pidfile_name, FN_REFLEN - strlen(suffix) - 1);
-+ return (const char *)
-+ fn_format(buff, buff, "", suffix, MYF(MY_REPLACE_EXT|MY_REPLACE_DIR));
-+
- }
- // get rid of extension if the log is binary to avoid problems
- if (strip_ext)
Deleted: branches/experimental-5.0/debian/patches/58_disable-ndb-backup-print.dpatch
===================================================================
--- branches/experimental-5.0/debian/patches/58_disable-ndb-backup-print.dpatch 2008-08-10 05:48:00 UTC (rev 1298)
+++ branches/experimental-5.0/debian/patches/58_disable-ndb-backup-print.dpatch 2008-08-10 06:04:37 UTC (rev 1299)
@@ -1,19 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 58_disable-ndb-backup-print.dpatch by Norbert Tretkowski <nobse at debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-diff -Nur mysql-dfsg-5.0-5.0.51a.orig/mysql-test/t/disabled.def mysql-dfsg-5.0-5.0.51a/mysql-test/t/disabled.def
---- mysql-dfsg-5.0-5.0.51a.orig/mysql-test/t/disabled.def 2008-01-11 16:23:06.000000000 +0100
-+++ mysql-dfsg-5.0-5.0.51a/mysql-test/t/disabled.def 2008-08-09 15:55:05.000000000 +0200
-@@ -16,3 +16,8 @@
- im_options_set : Bug#20294: Instance manager tests fail randomly
- im_options_unset : Bug#20294: Instance manager tests fail randomly
- im_utils : Bug#20294: Instance manager tests fail randomly
-+ndb_backup_print : Bug#32357: ndb_backup_print test fails sometimes in pushbuild
-+ndb_alter_table : failed for some reason
-+ndb_replace : failed for some reason
-+innodb_handler : http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=491363
-+rpl_ndb_innodb_trans : http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=494238
Deleted: branches/experimental-5.0/debian/patches/90_upstreamdebiandir.dpatch
===================================================================
--- branches/experimental-5.0/debian/patches/90_upstreamdebiandir.dpatch 2008-08-10 05:48:00 UTC (rev 1298)
+++ branches/experimental-5.0/debian/patches/90_upstreamdebiandir.dpatch 2008-08-10 06:04:37 UTC (rev 1299)
@@ -1,73 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 90_upstreamdebiandir.dpatch by <sean at rangda.stickybit.se>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-diff -urNad mysql-dfsg-5.0-5.0.51a~/Makefile.am mysql-dfsg-5.0-5.0.51a/Makefile.am
---- mysql-dfsg-5.0-5.0.51a~/Makefile.am 2008-01-11 12:43:18.000000000 -0200
-+++ mysql-dfsg-5.0-5.0.51a/Makefile.am 2008-02-19 16:38:21.948929495 -0300
-@@ -33,7 +33,7 @@
- @thread_dirs@ pstack \
- @sql_union_dirs@ scripts @man_dirs@ tests SSL\
- BUILD netware os2 @libmysqld_dirs@ \
-- @bench_dirs@ support-files @tools_dirs@ win debian
-+ @bench_dirs@ support-files @tools_dirs@ win
-
- # Run these targets before any others, also make part of clean target,
- # to make sure we create new links after a clean.
-diff -urNad mysql-dfsg-5.0-5.0.51a~/Makefile.in mysql-dfsg-5.0-5.0.51a/Makefile.in
---- mysql-dfsg-5.0-5.0.51a~/Makefile.in 2008-02-19 16:34:10.506600613 -0300
-+++ mysql-dfsg-5.0-5.0.51a/Makefile.in 2008-02-19 16:37:53.079284308 -0300
-@@ -386,7 +386,7 @@
- @thread_dirs@ pstack \
- @sql_union_dirs@ scripts @man_dirs@ tests SSL\
- BUILD netware os2 @libmysqld_dirs@ \
-- @bench_dirs@ support-files @tools_dirs@ win debian
-+ @bench_dirs@ support-files @tools_dirs@ win
-
-
- # Run these targets before any others, also make part of clean target,
-@@ -594,7 +594,7 @@
- distdir: $(DISTFILES)
- $(am__remove_distdir)
- mkdir $(distdir)
-- $(mkdir_p) $(distdir)/bdb $(distdir)/config/ac-macros $(distdir)/debian $(distdir)/include $(distdir)/libmysql $(distdir)/ndb/include $(distdir)/ndb/src
-+ $(mkdir_p) $(distdir)/bdb $(distdir)/config/ac-macros $(distdir)/include $(distdir)/libmysql $(distdir)/ndb/include $(distdir)/ndb/src
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
-diff -urNad mysql-dfsg-5.0-5.0.51a~/configure mysql-dfsg-5.0-5.0.51a/configure
---- mysql-dfsg-5.0-5.0.51a~/configure 2008-02-19 16:34:14.378821279 -0300
-+++ mysql-dfsg-5.0-5.0.51a/configure 2008-02-19 16:34:53.177032263 -0300
-@@ -41886,7 +41886,7 @@
-
-
- # Output results
-- ac_config_files="$ac_config_files Makefile extra/Makefile mysys/Makefile strings/Makefile regex/Makefile heap/Makefile myisam/Makefile myisammrg/Makefile os2/Makefile os2/include/Makefile os2/include/sys/Makefile man/Makefile BUILD/Makefile vio/Makefile libmysql/Makefile client/Makefile pstack/Makefile pstack/aout/Makefile sql/Makefile sql/share/Makefile sql-common/Makefile SSL/Makefile dbug/Makefile scripts/Makefile include/Makefile sql-bench/Makefile server-tools/Makefile server-tools/instance-manager/Makefile tests/Makefile Docs/Makefile support-files/Makefile support-files/MacOSX/Makefile support-files/RHEL4-SElinux/Makefile mysql-test/Makefile netware/Makefile include/mysql_version.h cmd-line-utils/Makefile cmd-line-utils/libedit/Makefile win/Makefile zlib/Makefile debian/Makefile debian/defs.mk debian/control cmd-line-utils/readline/Makefile"
-+ ac_config_files="$ac_config_files Makefile extra/Makefile mysys/Makefile strings/Makefile regex/Makefile heap/Makefile myisam/Makefile myisammrg/Makefile os2/Makefile os2/include/Makefile os2/include/sys/Makefile man/Makefile BUILD/Makefile vio/Makefile libmysql/Makefile client/Makefile pstack/Makefile pstack/aout/Makefile sql/Makefile sql/share/Makefile sql-common/Makefile SSL/Makefile dbug/Makefile scripts/Makefile include/Makefile sql-bench/Makefile server-tools/Makefile server-tools/instance-manager/Makefile tests/Makefile Docs/Makefile support-files/Makefile support-files/MacOSX/Makefile support-files/RHEL4-SElinux/Makefile mysql-test/Makefile netware/Makefile include/mysql_version.h cmd-line-utils/Makefile cmd-line-utils/libedit/Makefile win/Makefile zlib/Makefile cmd-line-utils/readline/Makefile"
-
- ac_config_commands="$ac_config_commands default"
-
-@@ -42612,9 +42612,6 @@
- "cmd-line-utils/libedit/Makefile" ) CONFIG_FILES="$CONFIG_FILES cmd-line-utils/libedit/Makefile" ;;
- "win/Makefile" ) CONFIG_FILES="$CONFIG_FILES win/Makefile" ;;
- "zlib/Makefile" ) CONFIG_FILES="$CONFIG_FILES zlib/Makefile" ;;
-- "debian/Makefile" ) CONFIG_FILES="$CONFIG_FILES debian/Makefile" ;;
-- "debian/defs.mk" ) CONFIG_FILES="$CONFIG_FILES debian/defs.mk" ;;
-- "debian/control" ) CONFIG_FILES="$CONFIG_FILES debian/control" ;;
- "cmd-line-utils/readline/Makefile" ) CONFIG_FILES="$CONFIG_FILES cmd-line-utils/readline/Makefile" ;;
- "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
- "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
-diff -urNad mysql-dfsg-5.0-5.0.51a~/configure.in mysql-dfsg-5.0-5.0.51a/configure.in
---- mysql-dfsg-5.0-5.0.51a~/configure.in 2008-02-19 16:34:15.042859120 -0300
-+++ mysql-dfsg-5.0-5.0.51a/configure.in 2008-02-19 16:38:06.916072821 -0300
-@@ -3000,7 +3000,6 @@
- cmd-line-utils/libedit/Makefile dnl
- win/Makefile dnl
- zlib/Makefile dnl
-- debian/Makefile debian/defs.mk debian/control dnl
- cmd-line-utils/readline/Makefile)
- AC_CONFIG_COMMANDS([default], , test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h)
- AC_OUTPUT
Deleted: branches/experimental-5.0/debian/patches/91_SECURITY_CVE-2007-5925.dpatch
===================================================================
--- branches/experimental-5.0/debian/patches/91_SECURITY_CVE-2007-5925.dpatch 2008-08-10 05:48:00 UTC (rev 1298)
+++ branches/experimental-5.0/debian/patches/91_SECURITY_CVE-2007-5925.dpatch 2008-08-10 06:04:37 UTC (rev 1299)
@@ -1,123 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 91_SECURITY_CVE-2007-5925.dpatch by Norbert Tretkowski <nobse at debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Fix for CVE-2007-5925: The convert_search_mode_to_innobase function in
-## DP: ha_innodb.cc in the InnoDB engine in MySQL 5.1.23-BK and earlier allows
-## DP: remote authenticated users to cause a denial of service (database crash)
-## DP: via a certain CONTAINS operation on an indexed column, which triggers an
-## DP: assertion error. (closes: #451235)
-
- at DPATCH@
-diff -ru old/innobase/include/db0err.h new/innobase/include/db0err.h
---- old/innobase/include/db0err.h 2007-07-04 16:06:59.000000000 +0300
-+++ new/innobase/include/db0err.h 2007-11-15 10:23:51.000000000 +0200
-@@ -57,6 +57,18 @@
- buffer pool (for big transactions,
- InnoDB stores the lock structs in the
- buffer pool) */
-+#define DB_FOREIGN_DUPLICATE_KEY 46 /* foreign key constraints
-+ activated by the operation would
-+ lead to a duplicate key in some
-+ table */
-+#define DB_TOO_MANY_CONCURRENT_TRXS 47 /* when InnoDB runs out of the
-+ preconfigured undo slots, this can
-+ only happen when there are too many
-+ concurrent transactions */
-+#define DB_UNSUPPORTED 48 /* when InnoDB sees any artefact or
-+ a feature that it can't recoginize or
-+ work with e.g., FT indexes created by
-+ a later version of the engine. */
-
- /* The following are partial failure codes */
- #define DB_FAIL 1000
-diff -ru old/innobase/include/page0cur.h new/innobase/include/page0cur.h
---- old/innobase/include/page0cur.h 2007-07-04 16:06:10.000000000 +0300
-+++ new/innobase/include/page0cur.h 2007-11-15 10:23:51.000000000 +0200
-@@ -22,6 +22,7 @@
-
- /* Page cursor search modes; the values must be in this order! */
-
-+#define PAGE_CUR_UNSUPP 0
- #define PAGE_CUR_G 1
- #define PAGE_CUR_GE 2
- #define PAGE_CUR_L 3
-diff -ru old/sql/ha_innodb.cc new/sql/ha_innodb.cc
---- old/sql/ha_innodb.cc 2007-07-04 16:06:48.000000000 +0300
-+++ new/sql/ha_innodb.cc 2007-11-15 10:25:55.000000000 +0200
-@@ -526,6 +526,9 @@
- }
-
- return(HA_ERR_LOCK_TABLE_FULL);
-+ } else if (error == DB_UNSUPPORTED) {
-+
-+ return(HA_ERR_UNSUPPORTED);
- } else {
- return(-1); // Unknown error
- }
-@@ -3689,11 +3692,21 @@
- and comparison of non-latin1 char type fields in
- innobase_mysql_cmp() to get PAGE_CUR_LE_OR_EXTENDS to
- work correctly. */
--
-- default: assert(0);
-+ case HA_READ_MBR_CONTAIN:
-+ case HA_READ_MBR_INTERSECT:
-+ case HA_READ_MBR_WITHIN:
-+ case HA_READ_MBR_DISJOINT:
-+ my_error(ER_TABLE_CANT_HANDLE_SPKEYS, MYF(0));
-+ return(PAGE_CUR_UNSUPP);
-+ /* do not use "default:" in order to produce a gcc warning:
-+ enumeration value '...' not handled in switch
-+ (if -Wswitch or -Wall is used)
-+ */
- }
-
-- return(0);
-+ my_error(ER_CHECK_NOT_IMPLEMENTED, MYF(0), "this functionality");
-+
-+ return(PAGE_CUR_UNSUPP);
- }
-
- /*
-@@ -3831,11 +3844,18 @@
-
- last_match_mode = (uint) match_mode;
-
-- innodb_srv_conc_enter_innodb(prebuilt->trx);
-+ if (mode != PAGE_CUR_UNSUPP) {
-
-- ret = row_search_for_mysql((byte*) buf, mode, prebuilt, match_mode, 0);
-+ innodb_srv_conc_enter_innodb(prebuilt->trx);
-
-- innodb_srv_conc_exit_innodb(prebuilt->trx);
-+ ret = row_search_for_mysql((byte*) buf, mode, prebuilt,
-+ match_mode, 0);
-+
-+ innodb_srv_conc_exit_innodb(prebuilt->trx);
-+ } else {
-+
-+ ret = DB_UNSUPPORTED;
-+ }
-
- if (ret == DB_SUCCESS) {
- error = 0;
-@@ -5150,8 +5170,16 @@
- mode2 = convert_search_mode_to_innobase(max_key ? max_key->flag :
- HA_READ_KEY_EXACT);
-
-- n_rows = btr_estimate_n_rows_in_range(index, range_start,
-- mode1, range_end, mode2);
-+ if (mode1 != PAGE_CUR_UNSUPP && mode2 != PAGE_CUR_UNSUPP) {
-+
-+ n_rows = btr_estimate_n_rows_in_range(index, range_start,
-+ mode1, range_end,
-+ mode2);
-+ } else {
-+
-+ n_rows = 0;
-+ }
-+
- dtuple_free_for_mysql(heap1);
- dtuple_free_for_mysql(heap2);
-
Deleted: branches/experimental-5.0/debian/patches/92_SECURITY_CVE-2008-2079.dpatch
===================================================================
--- branches/experimental-5.0/debian/patches/92_SECURITY_CVE-2008-2079.dpatch 2008-08-10 05:48:00 UTC (rev 1298)
+++ branches/experimental-5.0/debian/patches/92_SECURITY_CVE-2008-2079.dpatch 2008-08-10 06:04:37 UTC (rev 1299)
@@ -1,380 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 92_SECURITY_CVE-2008-2079.dpatch by Norbert Tretkowski <nobse at debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Fix for CVE-2008-2079: It was possible to circumvent privileges through
-## DP: the creation of MyISAM tables employing the DATA DIRECTORY and INDEX
-## DP: DIRECTORY options to overwrite existing table files in the MySQL data
-## DP: directory. Use of the MySQL data directory in DATA DIRECTORY and INDEX
-## DP: DIRECTORY is now disallowed.
-
- at DPATCH@
---- a/mysql-test/r/symlink.result.orig
-+++ b/mysql-test/r/symlink.result
-@@ -100,23 +100,15 @@ t1 CREATE TABLE `t1` (
- ) ENGINE=MyISAM DEFAULT CHARSET=latin1
- drop table t1;
- CREATE TABLE t1(a INT)
--DATA DIRECTORY='TEST_DIR/master-data/mysql'
--INDEX DIRECTORY='TEST_DIR/master-data/mysql';
--RENAME TABLE t1 TO user;
--ERROR HY000: Can't create/write to file 'TEST_DIR/master-data/mysql/user.MYI' (Errcode: 17)
--DROP TABLE t1;
--show create table t1;
--Table Create Table
--t1 CREATE TABLE `t1` (
-- `i` int(11) default NULL
--) ENGINE=MyISAM DEFAULT CHARSET=latin1
--drop table t1;
--show create table t1;
--Table Create Table
--t1 CREATE TABLE `t1` (
-- `i` int(11) default NULL
--) ENGINE=MyISAM DEFAULT CHARSET=latin1
--drop table t1;
-+DATA DIRECTORY='TEST_DIR/tmp'
-+INDEX DIRECTORY='TEST_DIR/tmp';
-+ERROR HY000: Can't create/write to file 'TEST_DIR/tmp/t1.MYI' (Errcode: 17)
-+CREATE TABLE t2(a INT)
-+DATA DIRECTORY='TEST_DIR/tmp'
-+INDEX DIRECTORY='TEST_DIR/tmp';
-+RENAME TABLE t2 TO t1;
-+ERROR HY000: Can't create/write to file 'TEST_DIR/tmp/t1.MYI' (Errcode: 17)
-+DROP TABLE t2;
- show create table t1;
- Table Create Table
- t1 CREATE TEMPORARY TABLE `t1` (
-@@ -138,27 +130,38 @@ select * from t1;
- a
- 42
- drop table t1;
-+execute stmt;
-+show create table t1;
-+Table Create Table
-+t1 CREATE TABLE `t1` (
-+ `c` char(10) default NULL
-+) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/'
-+drop table t1;
-+execute stmt;
-+show create table t1;
-+Table Create Table
-+t1 CREATE TABLE `t1` (
-+ `c` char(10) default NULL
-+) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/'
-+drop table t1;
-+deallocate prepare stmt;
-+CREATE TABLE t1(a INT)
-+DATA DIRECTORY='TEST_DIR/var/master-data/test';
-+Got one of the listed errors
-+CREATE TABLE t1(a INT)
-+DATA DIRECTORY='TEST_DIR/var/master-data/';
-+Got one of the listed errors
-+CREATE TABLE t1(a INT)
-+INDEX DIRECTORY='TEST_DIR/var/master-data';
-+Got one of the listed errors
-+CREATE TABLE t1(a INT)
-+INDEX DIRECTORY='TEST_DIR/var/master-data_var';
-+Got one of the listed errors
- End of 4.1 tests
--CREATE DATABASE db1;
--CREATE DATABASE db2;
--USE db2;
--INSERT INTO db2.t1 VALUES (1);
--SELECT * FROM db2.t1;
--b
--1
--RESET QUERY CACHE;
--USE db1;
- SET SESSION keep_files_on_create = TRUE;
- CREATE TABLE t1 (a INT) ENGINE MYISAM;
--ERROR HY000: Can't create/write to file './db1/t1.MYD' (Errcode: 17)
--CREATE TABLE t3 (a INT) Engine=MyISAM;
--INSERT INTO t3 VALUES (1),(2),(3);
--TRUNCATE TABLE t3;
--SELECT * from t3;
--a
--SET SESSION keep_files_on_create = DEFAULT;
--DROP TABLE db2.t1, db1.t3;
--DROP DATABASE db1;
--DROP DATABASE db2;
--USE test;
-+ERROR HY000: Can't create/write to file './test/t1.MYD' (Errcode: 17)
-+SET SESSION keep_files_on_create = FALSE;
-+CREATE TABLE t1 (a INT) ENGINE MYISAM;
-+DROP TABLE t1;
- End of 5.0 tests
---- a/sql/mysql_priv.h.orig
-+++ b/sql/mysql_priv.h
-@@ -1255,6 +1255,7 @@ void my_dbopt_free(void);
- extern time_t server_start_time, flush_status_time;
- extern char *mysql_data_home,server_version[SERVER_VERSION_LENGTH],
- mysql_real_data_home[], *opt_mysql_tmpdir, mysql_charsets_dir[],
-+ mysql_unpacked_real_data_home[],
- def_ft_boolean_syntax[sizeof(ft_boolean_syntax)];
- #define mysql_tmpdir (my_tmpdir(&mysql_tmpdir_list))
- extern MY_TMPDIR mysql_tmpdir_list;
---- a/sql/mysqld.cc.orig
-+++ b/sql/mysqld.cc
-@@ -453,14 +453,13 @@ char log_error_file[FN_REFLEN], glob_hos
- char mysql_real_data_home[FN_REFLEN],
- language[FN_REFLEN], reg_ext[FN_EXTLEN], mysql_charsets_dir[FN_REFLEN],
- *opt_init_file, *opt_tc_log_file,
-+ mysql_unpacked_real_data_home[FN_REFLEN],
- def_ft_boolean_syntax[sizeof(ft_boolean_syntax)];
--
-+char *mysql_data_home= mysql_real_data_home;
- const key_map key_map_empty(0);
- key_map key_map_full(0); // Will be initialized later
-
- const char *opt_date_time_formats[3];
--
--char *mysql_data_home= mysql_real_data_home;
- char server_version[SERVER_VERSION_LENGTH];
- char *mysqld_unix_port, *opt_mysql_tmpdir;
- const char **errmesg; /* Error messages */
-@@ -7565,6 +7564,9 @@ static void fix_paths(void)
- pos[1]= 0;
- }
- convert_dirname(mysql_real_data_home,mysql_real_data_home,NullS);
-+ (void) fn_format(buff, mysql_real_data_home, "", "",
-+ (MY_RETURN_REAL_PATH|MY_RESOLVE_SYMLINKS));
-+ (void) unpack_dirname(mysql_unpacked_real_data_home, buff);
- convert_dirname(language,language,NullS);
- (void) my_load_path(mysql_home,mysql_home,""); // Resolve current dir
- (void) my_load_path(mysql_real_data_home,mysql_real_data_home,mysql_home);
---- ../old/mysql-dfsg-5.0-5.0.51a/sql/sql_parse.cc 2008-01-11 14:43:38.000000000 +0000
-+++ mysql-dfsg-5.0-5.0.51a/sql/sql_parse.cc 2008-07-12 06:18:51.000000000 +0000
-@@ -76,6 +76,7 @@
- static bool append_file_to_dir(THD *thd, const char **filename_ptr,
- const char *table_name);
- static bool check_show_create_table_access(THD *thd, TABLE_LIST *table);
-+static bool test_if_data_home_dir(const char *dir);
-
- const char *any_db="*any*"; // Special symbol for check_access
-
-@@ -3001,6 +3002,20 @@
- "INDEX DIRECTORY option ignored");
- create_info.data_file_name= create_info.index_file_name= NULL;
- #else
-+
-+ if (test_if_data_home_dir(lex->create_info.data_file_name))
-+ {
-+ my_error(ER_WRONG_ARGUMENTS,MYF(0),"DATA DIRECORY");
-+ res= -1;
-+ break;
-+ }
-+ if (test_if_data_home_dir(lex->create_info.index_file_name))
-+ {
-+ my_error(ER_WRONG_ARGUMENTS,MYF(0),"INDEX DIRECORY");
-+ res= -1;
-+ break;
-+ }
-+
- /* Fix names if symlinked tables */
- if (append_file_to_dir(thd, &create_info.data_file_name,
- create_table->table_name) ||
-@@ -7843,3 +7858,49 @@
-
- return TRUE;
- }
-+
-+
-+/*
-+ Check if path does not contain mysql data home directory
-+
-+ SYNOPSIS
-+ test_if_data_home_dir()
-+ dir directory
-+ conv_home_dir converted data home directory
-+ home_dir_len converted data home directory length
-+
-+ RETURN VALUES
-+ 0 ok
-+ 1 error
-+*/
-+
-+static bool test_if_data_home_dir(const char *dir)
-+{
-+ char path[FN_REFLEN], conv_path[PATH_MAX+1], real_path[PATH_MAX+1];
-+ uint dir_len, home_dir_len= strlen(mysql_unpacked_real_data_home);
-+ DBUG_ENTER("test_if_data_home_dir");
-+
-+ if (!dir)
-+ DBUG_RETURN(0);
-+
-+ (void) fn_format(path, dir, "", "",
-+ (MY_RETURN_REAL_PATH|MY_RESOLVE_SYMLINKS));
-+ if (!realpath(path, real_path))
-+ DBUG_RETURN(1);
-+ dir_len= unpack_dirname(conv_path, real_path);
-+
-+ if (home_dir_len <= dir_len)
-+ {
-+ if (lower_case_file_system)
-+ {
-+ if (!my_strnncoll(default_charset_info, (const uchar*) conv_path,
-+ home_dir_len,
-+ (const uchar*) mysql_unpacked_real_data_home,
-+ home_dir_len))
-+ DBUG_RETURN(1);
-+ }
-+ else if (!memcmp(conv_path, mysql_unpacked_real_data_home, home_dir_len))
-+ DBUG_RETURN(1);
-+ }
-+ DBUG_RETURN(0);
-+}
---- ../old/mysql-dfsg-5.0-5.0.51a/mysql-test/t/symlink.test 2008-01-11 15:23:24.000000000 +0000
-+++ mysql-dfsg-5.0-5.0.51a/mysql-test/t/symlink.test 2008-07-13 14:13:04.000000000 +0000
-@@ -71,17 +71,17 @@
- SHOW CREATE TABLE t9;
-
- disable_query_log;
----error 1103,1103
-+--error 1210,1210
- create table t1 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam data directory="tmp";
-
- # Check that we cannot link over a table from another database.
-
- create database mysqltest;
-
----error 1,1
-+--error 1210,1210
- create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="/this-dir-does-not-exist";
-
----error 1103,1103
-+--error 1210,1210
- create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="not-hard-path";
-
- # Should fail becasue the file t9.MYI already exist in 'run'
-@@ -127,29 +127,22 @@
- #
- # BUG#32111 - Security Breach via DATA/INDEX DIRECORY and RENAME TABLE
- #
-+--write_file $MYSQLTEST_VARDIR/tmp/t1.MYI
-+EOF
- --replace_result $MYSQLTEST_VARDIR TEST_DIR
-+--error 1
- eval CREATE TABLE t1(a INT)
--DATA DIRECTORY='$MYSQLTEST_VARDIR/master-data/mysql'
--INDEX DIRECTORY='$MYSQLTEST_VARDIR/master-data/mysql';
-+DATA DIRECTORY='$MYSQLTEST_VARDIR/tmp'
-+INDEX DIRECTORY='$MYSQLTEST_VARDIR/tmp';
-+--replace_result $MYSQLTEST_VARDIR TEST_DIR
-+eval CREATE TABLE t2(a INT)
-+DATA DIRECTORY='$MYSQLTEST_VARDIR/tmp'
-+INDEX DIRECTORY='$MYSQLTEST_VARDIR/tmp';
- --replace_result $MYSQLTEST_VARDIR TEST_DIR
- --error 1
--RENAME TABLE t1 TO user;
--DROP TABLE t1;
--
--#
--# Test specifying DATA DIRECTORY that is the same as what would normally
--# have been chosen. (Bug #8707)
--#
--disable_query_log;
--eval create table t1 (i int) data directory = "$MYSQLTEST_VARDIR/master-data/test/";
--enable_query_log;
--show create table t1;
--drop table t1;
--disable_query_log;
--eval create table t1 (i int) index directory = "$MYSQLTEST_VARDIR/master-data/test/";
--enable_query_log;
--show create table t1;
--drop table t1;
-+RENAME TABLE t2 TO t1;
-+DROP TABLE t2;
-+--remove_file $MYSQLTEST_VARDIR/tmp/t1.MYI
-
- #
- # Bug#8706 - temporary table with data directory option fails
-@@ -188,44 +181,61 @@
- select * from t1;
- drop table t1;
-
----echo End of 4.1 tests
--
- #
--# Bug #29325: create table overwrites .MYD file of other table (datadir)
-+# CREATE TABLE with DATA DIRECTORY option
- #
--
--CREATE DATABASE db1;
--CREATE DATABASE db2;
--
--USE db2;
-+# Protect ourselves from data left in tmp/ by a previos possibly failed
-+# test
-+--system rm -f $MYSQLTEST_VARDIR/tmp/t1.*
- --disable_query_log
--eval CREATE TABLE t1 (b INT) ENGINE MYISAM
--DATA DIRECTORY = '$MYSQLTEST_VARDIR/master-data/db1/';
-+eval prepare stmt from "create table t1 (c char(10)) data directory='$MYSQLTEST_VARDIR/tmp'";
- --enable_query_log
-+execute stmt;
-+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
-+show create table t1;
-+drop table t1;
-+execute stmt;
-+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
-+show create table t1;
-+drop table t1;
-+deallocate prepare stmt;
-
--INSERT INTO db2.t1 VALUES (1);
--SELECT * FROM db2.t1;
--RESET QUERY CACHE;
-+#
-+# Bug#32167 another privilege bypass with DATA/INDEX DIRECORY
-+#
-+--replace_result $MYSQL_TEST_DIR TEST_DIR
-+--error 1,1210
-+eval CREATE TABLE t1(a INT)
-+DATA DIRECTORY='$MYSQL_TEST_DIR/var/master-data/test';
-+--replace_result $MYSQL_TEST_DIR TEST_DIR
-+--error 1,1210
-+eval CREATE TABLE t1(a INT)
-+DATA DIRECTORY='$MYSQL_TEST_DIR/var/master-data/';
-+--replace_result $MYSQL_TEST_DIR TEST_DIR
-+--error 1,1210
-+eval CREATE TABLE t1(a INT)
-+INDEX DIRECTORY='$MYSQL_TEST_DIR/var/master-data';
-+--replace_result $MYSQL_TEST_DIR TEST_DIR
-+--error 1,1210
-+eval CREATE TABLE t1(a INT)
-+INDEX DIRECTORY='$MYSQL_TEST_DIR/var/master-data_var';
-
--USE db1;
-+--echo End of 4.1 tests
-
--#no warning from create table
-+#
-+# Bug #29325: create table overwrites .MYD file of other table (datadir)
-+#
- SET SESSION keep_files_on_create = TRUE;
-+--write_file $MYSQLTEST_VARDIR/master-data/test/t1.MYD
-+EOF
- --disable_abort_on_error
-+--error 1
- CREATE TABLE t1 (a INT) ENGINE MYISAM;
-+--error 0,1
-+--remove_file $MYSQLTEST_VARDIR/master-data/test/t1.MYD;
- --enable_abort_on_error
--
--CREATE TABLE t3 (a INT) Engine=MyISAM;
--INSERT INTO t3 VALUES (1),(2),(3);
--TRUNCATE TABLE t3;
--SELECT * from t3;
--
--SET SESSION keep_files_on_create = DEFAULT;
--
--DROP TABLE db2.t1, db1.t3;
--DROP DATABASE db1;
--DROP DATABASE db2;
--USE test;
--
-+SET SESSION keep_files_on_create = FALSE;
-+CREATE TABLE t1 (a INT) ENGINE MYISAM;
-+DROP TABLE t1;
-
- --echo End of 5.0 tests
More information about the Pkg-mysql-commits
mailing list