Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

revolter
Copy link
Member

Related to #653.

@justinclift
Copy link
Member

Trying this out myself locally, as no-one else seems to be getting back to you about it. 😉

I've just tested this with a small data set, exported via our Export to SQL dialog.

When loading that through the "Open SQL file" button in the Execute SQL tab, this seems to work decently. The data is successfully loaded, and can be seen through the Browse Data tab.

Two items worth mentioning:

  • When executing the SQL, the log shows not an error: as the completion message, which seems a bit weird. Kind of looks like it's missing a string fragment. 😉
  • People also hit this nested transaction error when importing SQL via the main File → Import menu. This RegExp should probably be applied there too. 😄

@revolter
Copy link
Member Author

AFAIK, that not an error: is showing on INSERTs only, and it's not related to this PR. It was the same before.

I personally thought that an error actually occurred when I once inserted some data for work. But it really didn't have any error, so I think that that message is just weird.

And, forgot about that method. If you know and can point me directly to the code that imports it, I'll make another commit on this PR or open another PR. But don't know if I can do it soon.

@justinclift
Copy link
Member

This seems to be where the SQL importing function is called:

    https://github.com/sqlitebrowser/sqlitebrowser/blob/master/src/MainWindow.cpp#L1148

Which seems to be defined here:

    https://github.com/sqlitebrowser/sqlitebrowser/blob/master/src/sqlitedb.cpp#L613-L678

Workable? 😄

@justinclift justinclift added the bug Confirmed bugs or reports that are very likely to be bugs. label Jul 22, 2016
@revolter
Copy link
Member Author

@justinclift, I totally forgot that this one was not merged. I just pushed a commit that hopefully solves it using Git2Go (for the first time). Can you test it please?

@justinclift
Copy link
Member

@revolter That commit is failing on Travis:

[ 68%] Building CXX object CMakeFiles/sqlitebrowser.dir/src/sqlitedb.cpp.o
/home/travis/build/sqlitebrowser/sqlitebrowser/src/sqlitedb.cpp: In member function ‘bool DBBrowserDB::executeMultiSQL(const QString&, bool, bool)’:
/home/travis/build/sqlitebrowser/sqlitebrowser/src/sqlitedb.cpp:619:81: error: passing ‘const QString’ as ‘this’ argument of ‘QString& QString::remove(const QRegExp&)’ discards qualifiers [-fpermissive]
/home/travis/build/sqlitebrowser/sqlitebrowser/src/sqlitedb.cpp:619:81: error: passing ‘const QString’ as ‘this’ argument of ‘QString& QString::operator=(const QString&)’ discards qualifiers [-fpermissive]
make[2]: *** [CMakeFiles/sqlitebrowser.dir/src/sqlitedb.cpp.o] Error 1
make[1]: *** [CMakeFiles/sqlitebrowser.dir/all] Error 2
make: *** [all] Error 2

If you want to look into it then great. If not, get started on your holiday and I'll take a look over the weekend. 😄

@revolter
Copy link
Member Author

Already solved it, I guess :P

@justinclift
Copy link
Member

Nope... Travis just barfed again. 😏

@justinclift
Copy link
Member

The message this time:

[ 68%] Building CXX object CMakeFiles/sqlitebrowser.dir/src/sqlitedb.cpp.o
/home/travis/build/sqlitebrowser/sqlitebrowser/src/sqlitedb.cpp: In member function ‘bool DBBrowserDB::executeMultiSQL(const QString&, bool, bool)’:
/home/travis/build/sqlitebrowser/sqlitebrowser/src/sqlitedb.cpp:619:85: error: passing ‘const QString’ as ‘this’ argument of ‘QString& QString::remove(const QRegExp&)’ discards qualifiers [-fpermissive]
make[2]: *** [CMakeFiles/sqlitebrowser.dir/src/sqlitedb.cpp.o] Error 1
make[1]: *** [CMakeFiles/sqlitebrowser.dir/all] Error 2
make: *** [all] Error 2

@revolter
Copy link
Member Author

Three things:

  • I don't understand why remove changes the receiver object but returns the same value too.
  • It should be fixed now
  • Is it bad that I added 2 "useless" commits? Or are they combined into just one on merge?

@revolter
Copy link
Member Author

@justinclift, The Travis is happy now, do you have time to test it? 😄

@justinclift
Copy link
Member

Awesome @revolter. 😀

Just tested it here on a sample data set. Now importing works via either File → Import, and via the Execute SQL tab.

Merging it in a sec (will remember to choose the "Squash commits" option this time! 😉)

@justinclift justinclift merged commit d03aef1 into sqlitebrowser:master Jul 24, 2016
@revolter revolter deleted the hotfix/ignore-transaction branch May 30, 2018 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants