+@@ -770,6 +791,7 @@
+ }
+
+ buffer_destroy(insert);
++ }
+ #endif
+
+ buffer_destroy (query);
+@@ -2701,6 +2723,9 @@
+ char db[64] = { 0 };
+ int port = 3306, i = 0, real_connect_flag = 0;
+
++ if (_ds_match_attribute(CTX->config->attributes, "MySQLVersion40", "on"))
++ use_mysql40 = 1;
++
+ /* Read storage attributes */
+ if (_ds_read_attribute(CTX->config->attributes, "MySQLServer")) {
+ char *p;