From 75dfa4a35d728352c36abe12b294b1774ccbe14e Mon Sep 17 00:00:00 2001
From: skodak <skodak>
Date: Sat, 25 Oct 2008 18:26:55 +0000
Subject: [PATCH] MDL-14679 dml/native_mysqli implemented blob type

---
 lib/dml/mysqli_native_moodle_database.php | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/lib/dml/mysqli_native_moodle_database.php b/lib/dml/mysqli_native_moodle_database.php
index 29880796cd..3bd8337120 100644
--- a/lib/dml/mysqli_native_moodle_database.php
+++ b/lib/dml/mysqli_native_moodle_database.php
@@ -264,6 +264,20 @@ class mysqli_native_moodle_database extends moodle_database {
                 $info->auto_increment= false;
                 $info->unique        = null;
 
+            } else if (preg_match('/([a-z]*blob)/i', $rawcolumn->type, $matches)) {
+                $info->type          = $matches[1];
+                $info->meta_type     = 'B';
+                $info->max_length    = -1;
+                $info->scale         = null;
+                $info->not_null      = ($rawcolumn->null === 'NO');
+                $info->default_value = $rawcolumn->default;
+                $info->has_default   = is_null($info->default_value) ? false : true;
+                $info->primary_key   = false;
+                $info->binary        = true;
+                $info->unsigned      = null;
+                $info->auto_increment= false;
+                $info->unique        = null;
+
             } else if (preg_match('/enum\((.*)\)/i', $rawcolumn->type, $matches)) {
                 $info->type          = 'enum';
                 $info->meta_type     = 'C';
-- 
2.39.5