Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Unsupported type: BLOB" in create_defs.pl #4

Open
GoogleCodeExporter opened this issue Mar 29, 2016 · 0 comments
Open

"Unsupported type: BLOB" in create_defs.pl #4

GoogleCodeExporter opened this issue Mar 29, 2016 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

Run create_defs.pl on a database with tables that have any BLOB type.

What version of the product are you using? On what operating system?
Version innodb-recovery-0.3

The fix seemed simple enough. I added BLOB support to create_defs.pl. It
runs OK and generates a table_defs.h file with BLOBs defined. This
table_defs.h header compiles OK with tables_dict.c. After doing all this I
was able to run page_parser and constraints_parser on a database with many
BLOB fields... What I don't know is if actually works end-to-end. I had
various other problems with my corrupt ibdata1 file and I was unable to
recover any useful data. So, while my patch may product running code, I am
not sure if my fix actually works. But it seems straightforward enough for
me to let you decide if it should work or not.

I have enclosed a patch file and I have tried to include it inline here: 

<pre>
# diff -c innodb-recovery-0.3/create_defs.pl
innodb-recovery-0.3.noah/create_defs.pl 
*** innodb-recovery-0.3/create_defs.pl  2008-04-01 18:58:03.000000000 -0700
--- innodb-recovery-0.3.noah/create_defs.pl     2008-08-01
02:37:07.000000000 -0700
***************
*** 363,367 ****
--- 363,383 ----
                return { type => 'FT_CHAR', fixed_len => $len_bytes };
        }

+       if ($type =~ /^TINYBLOB$/i) {
+               return { type => 'FT_BLOB', min_len => 0, max_len => 255 };
+       }
+ 
+       if ($type =~ /^BLOB$/i) {
+               return { type => 'FT_BLOB', min_len => 0, max_len => 65535 };
+       }
+ 
+       if ($type =~ /^MEDIUMBLOB$/i) {
+               return { type => 'FT_BLOB', min_len => 0, max_len =>
16777215 };
+       }
+ 
+       if ($type =~ /^LONGBLOB$/i) {
+               return { type => 'FT_BLOB', min_len => 0, max_len =>
4294967295 };
+       }
+ 
        die "Unsupported type: $type!\n";
  }
</pre>

Original issue reported on code.google.com by noah%[email protected] on 4 Aug 2008 at 6:54

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant