-
Notifications
You must be signed in to change notification settings - Fork 40
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
Plugin Fails to rebuild queryobject #317
Comments
Line 10, in this case is actually line 10 from the If you also exported the SQL, can you post that, too? |
Oh thank you for your time, I didn't want to post the entire sourcefile to keep the code small but if its needed i will attach it at the bottom. The SQLstatement is as follows:
I don't have this issue with the other Database i am managing with this plugin, so It works fine with every other query. Sourcecode:
|
@CarolusMagnuss - I know we have seen problems sometimes with how subqueries are exported. You can see these issues for more details on that. I was trying to compare the SQL you posted with the exported query source, and they look very different to me. Would you be able to run a fresh export of that query from a working database, and post that source along with the SQL source that you get when you click the Also, as discussed more in #76, you might try making a small change to the query in the SQL view, and save and close the query. (Without opening it in the visual designer window.) When you run an export after that, it will generate a different type of export file. It is possible that this different format of export file may import just fine. Another option to consider is the checkbox to force the import of the original query SQL during build. This is not the preferred option because it resets the layout in the designer window, but it can solve some problems with importing certain types of queries. Sometimes you can design the query in a little different way, and it will work just fine. I hope that helps! |
@joyfullservice This is a 10 year old Database i started to maintain last year after it had been abandoned for several years, so i dont really know the ins and outs of everything in there yet. That being said you are quite right, the source and the sql of this query dont really match at all. Checking the Query in the database shows that it is broken. I can't really say when this happened, i might have to check the live version on monday as I dont have access to it right now, I will also check my sourcecode history to see if i can find a working version. After all isnt that what this is all for. I will get back to you. Regards |
Hi there again, after checking my source history and reading the linked issues i can confirm that the problem are subquerys within queries with the wrongful realignment of parenthesis and brackets during the export. I didn't rebuild from source for a while now, thats why i didn't notice earlier. I also simply add files to a commit which are shown as changed, although i know i didn't alter them because its usually due to some sanitization procedures (Removing extra lines, removing and adding an identical line) Thats why i missed this. |
I now managed to revert the broken queries to the last working version. There were 5 in total, which prompted an error on build. Not sure if related or not, but when the build of queries failed, quite often the AddIn failed to build all modules of the database. Even more strangely, simply by going into the options and checking and unchecking some of them seemed to reset that behaviour and the modules were built sucessfully on a subsequent build attempt. I will have to keep a close eye on this behaviour and I apprecciate all the effort that went into this AddInn Regards |
If you do experience a failed build, a "Full Export" of your Database will export all objects anew, and I wonder if that may have been part of the issue (VCS didn't detect changes, so didn't export, even though it was changed). Much of that detection tooling has been refactored in 4.x, so that's a bonus, but from what you're mentioning, it does seem suspicious. Please update as you figure out more! |
So i had to update another old query, where i simply added another column in the query designer. It now looks like this and uses a subquery
And sure enough the build fails again, although i do force the import of the original sql query. The failing modules do seem to be related as the only fail to be built if I have a failed query build, but i don't get an error file for the modules, so i can't really tell where exactly the AddInn trips. Regards |
@joyfullservice: from the sound of it...it may be the logic to check if a query has been altered inside/outside of the export is not properly detecting changes. @CarolusMagnuss: next time you get a failed build on a sub-query, before editing the subquery in the window like you did, do a If the build works afterwards, then it sounds like the logic is borked. The new indexing functions are being rolled into V4.x, so this is less likely to occur (if it is indeed the export detection logic). If not, then we'll check other things. But from what you've mentioned, I suspect the export logic may be caught in an edge case. |
Hi there,
I encounter a bug, where the AddInn Fails to rebuild a query from the repository. The LogFile gives me:
When i check the error log i finde the following error:
However then i look into the sourcefile i get this:
Now i have no Idea whats going wrong, this looks fine to me, but clearly there is an issue i am not seeing, could you help me find out?
The text was updated successfully, but these errors were encountered: