AnantLabs / wwwsqldesigner

Automatically exported from code.google.com/p/wwwsqldesigner
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

php-mysql: saved xml data is truncated #34

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
--------------------------------------
1. save the contents of a large database using the save/load dialog
2. refresh the page to clear the contents
3. load the document

What is the expected output? What do you see instead?
-----------------------------------------------------
all tables in the saved document to be visualized, instead nothing is shown
at all (likely the visualization is appropriately failing fast as the
output would be a malformed XML document).

Inspection of the database table (wwwsqldesigner) shows that the data
column is truncated in large XML files.

What version of the product are you using? On what operating system?
--------------------------------------------------------------------
wwwsqldesigner svn rev 47
Ubuntu Karmic Koala Alpha 2
LAMP stack (from debian repository)
Firefox 3.0.11 Ubuntu

Please provide any additional information below.
------------------------------------------------
As a suggestion perhaps the output of 'save' can be dumped into a static
xml file named, for example, "$WEBROOT/saved/$NAME.xml".  Its probably
realistic to assume whoever is hosting wwwsqldesigner has the ability to
set writable permissions on the "saved" folder.  

The wwwsqldesigner database table could then be modified to save only the
filename ($NAME) and not the data.  As a nice side benefit you should get
free client-side caching, at least if you're hosting off of Apache you should.

The load request could then either echo out the content of the file, or
just provide a URL for the browser to perform a second AJAX request with.

I have not looked into the other database options (sqlite, etc) - so feel
free to comment on whether or not this logic will break them.

Original issue reported on code.google.com by Kabal...@gmail.com on 10 Jul 2009 at 8:58

GoogleCodeExporter commented 9 years ago
Perhaps the DB column datatype is too small? Can you inspect the POST request 
to see
if all data was sucessfully sent to server?

Saving into a file instead of DB is certainly an option. Feel free to create a
file+db-based caching php-mysql backend. These backends are not officialy 
maintained
by me, think of them as FF extensions/plugins.

Original comment by ondrej.zara on 10 Jul 2009 at 10:02

GoogleCodeExporter commented 9 years ago
The POST appears to contain the entire XML file (unless Firebug is lying to 
me). 
After posting the MySQL database definitely truncates the xml data.

The plugin script seems simple enough so I may write a quick one for the method 
I
described above.

Original comment by Kabal...@gmail.com on 10 Jul 2009 at 10:42

GoogleCodeExporter commented 9 years ago
Attached is the plugin that uses MySQL for importing but saves and loads from 
XML
dump files instead of a MySQL table

Original comment by Kabal...@gmail.com on 10 Jul 2009 at 1:07

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks a lot for your contribution, I commited your backend to SVN repository.

Original comment by ondrej.zara on 13 Jul 2009 at 5:56