Skip to content

Commit

Permalink
now assume mysql 5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdruppe committed May 24, 2017
1 parent 7ddf54f commit 6e8e347
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions mysql.d
@@ -1,5 +1,5 @@
/// NOTE: If you're using MySQL client library v5.1 or greater,
/// you must pass this to dmd: -version=MySQL_51
/// NOTE: If you're using MySQL client library v5.0 or less,
/// you must pass this to dmd: -version=Less_Than_MySQL_51
/// This is important - otherwise you will see bizarre segfaults!
module arsd.mysql;

Expand All @@ -8,8 +8,13 @@ version(MySQL_51) {
// we good
} else version(Less_Than_MySQL_51) {
// we good
} else
pragma(msg, "NOTE: If you are using MySQL 5.1 or newer, specify -version=MySQL_51 to dmd to avoid segfaults. If you are on an older version, you can shut this message up with -version=Less_Than_MySQL_51");
} else {
// default now is mysql 5.1 or up - it has been long
// enough that surely most everyone uses it and we don't
// need the pragma warning anymore. Of course, the old is
// still available if you need to explicitly opt in.
version = MySQL_51;
}

version(Windows) {
pragma(lib, "libmysql");
Expand Down

0 comments on commit 6e8e347

Please sign in to comment.