Merge lp:~hingo/drizzle/drizzle-drizzledump-and-other-version-fixes into lp:~drizzle-trunk/drizzle/development

Proposed by Henrik Ingo
Status: Merged
Merged at revision: 2504
Proposed branch: lp:~hingo/drizzle/drizzle-drizzledump-and-other-version-fixes
Merge into: lp:~drizzle-trunk/drizzle/development
Prerequisite: lp:~hingo/drizzle/drizzle-the-version-is-7.1-not-a-date-and-certainly-not-7
Diff against target: 44 lines (+15/-5)
2 files modified
client/server_detect.cc (+13/-3)
tests/r/comments.result (+2/-2)
To merge this branch: bzr merge lp:~hingo/drizzle/drizzle-drizzledump-and-other-version-fixes
Reviewer Review Type Date Requested Status
Mark Atwood Needs Fixing
Drizzle Merge Team Pending
Review via email: mp+91598@code.launchpad.net

Description of the change

This fixes the tests that fail if you do bzr tag 7.1.31-rc.

Note:
 - the main.comments test will fail against current trunk as long as it is on versions 2012.yy.zz. You need to tag a 7.1.x version. If this is a problem, then the test must be disabled for a transition period until the next release is out.
 - I've tested this with "bzr tag 7.1.31". I am now also running tests with "bzr tag 7.1.31-rc", will report back.

To post a comment you must log in.
Revision history for this message
Henrik Ingo (hingo) wrote :

Also "bzr tag 7.1.31-rc" passes the tests.

2503. By Henrik Ingo

Previous fix to server detection then only works against 7.1 series and
wouldn't correctly identify Drizzle 2011.xx.yy series. Now tests both
separetely.

Revision history for this message
Mark Atwood (fallenpegasus) wrote :
review: Needs Fixing
Revision history for this message
Henrik Ingo (hingo) wrote :

Those errors happen because you removed the pre-requisite branch. You need to merge both.

On current trunk without these two branches, this:
create temporary table t1 (a int not null auto_increment primary key) /*!40102 engine=MEMORY */;

becomes an InnoDB table when you do bzr tag 7.1.31 because the release_id becomes 7131 which is < 40102. InnoDB result set is then sorted differently from memory engine.

Revision history for this message
Henrik Ingo (hingo) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'client/server_detect.cc'
2--- client/server_detect.cc 2011-08-07 20:48:33 +0000
3+++ client/server_detect.cc 2012-02-06 22:58:19 +0000
4@@ -30,12 +30,22 @@
5 {
6 boost::match_flag_type flags = boost::match_default;
7
8- boost::regex mysql_regex("^([3-9]\\.[0-9]+\\.[0-9]+)");
9- boost::regex drizzle_regex("^(20[0-9]{2}\\.(0[1-9]|1[012])\\.[0-9]+)");
10+ // FIXME: Detecting capabilities from a version number is a recipe for
11+ // disaster, like we've seen with 15 years of JavaScript :-)
12+ // Anyway, as there is no MySQL 7.x yet, this will do for tonight.
13+ // I will get back to detect something tangible after the release (like
14+ // presence of some table or its record in DATA_DICTIONARY.
15+ boost::regex mysql_regex("^([3-6]\\.[0-9]+\\.[0-9]+)");
16+ boost::regex drizzle_regex7("^(20[0-9]{2}\\.(0[1-9]|1[012])\\.[0-9]+)");
17+ boost::regex drizzle_regex71("^([7-9]\\.[0-9]+\\.[0-9]+)");
18
19 version= drizzle_con_server_version(connection);
20
21- if (regex_search(version, drizzle_regex, flags))
22+ if (regex_search(version, drizzle_regex7, flags))
23+ {
24+ type= SERVER_DRIZZLE_FOUND;
25+ }
26+ else if (regex_search(version, drizzle_regex71, flags))
27 {
28 type= SERVER_DRIZZLE_FOUND;
29 }
30
31=== modified file 'tests/r/comments.result'
32--- tests/r/comments.result 2011-03-06 23:59:06 +0000
33+++ tests/r/comments.result 2012-02-06 22:58:19 +0000
34@@ -11,8 +11,8 @@
35 1 +1
36 2
37 select 1 /*!72301 +1 */;
38-1 +1
39-2
40+1
41+1
42 select 1--1;
43 1--1
44 2