Skip to content

Commit

Permalink
Fixed bug involving SELECT INTO
Browse files Browse the repository at this point in the history
  • Loading branch information
wind39 committed Apr 1, 2019
1 parent cdaac09 commit fcf8010
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
5 changes: 4 additions & 1 deletion OmniDB/OmniDB_app/include/Spartacus/Database.py
Original file line number Diff line number Diff line change
Expand Up @@ -1501,12 +1501,15 @@ def Parse(self, p_sql):
if v_analysis[i].get_type() == 'SELECT':
v_found_cte = False
v_found_dml = False
v_found_into = False
for v_token in v_analysis[i].flatten():
if v_token.ttype == sqlparse.tokens.Token.Keyword.CTE:
v_found_cte = True
if v_token.ttype == sqlparse.tokens.Token.Keyword.DML and v_token.value != 'SELECT':
v_found_dml = True
if not (v_found_cte and v_found_dml):
if v_token.is_keyword and v_token.value == 'INTO':
v_found_into = True
if not (v_found_cte and v_found_dml) and not v_found_into:
v_cursors.append('{0}_{1}'.format(self.v_application_name, uuid.uuid4().hex))
if len(v_cursors) > 0:
v_sql = ''
Expand Down
2 changes: 1 addition & 1 deletion OmniDB/OmniDB_app/tests/uat/centos7/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ SCRIPT
Vagrant.configure("2") do |config|
config.vm.provision "shell", inline: $script
config.vm.box = "centos/7"
config.vm.box_url = "https://app.vagrantup.com/ubuntu/boxes/centos/7"
config.vm.box_url = "https://app.vagrantup.com/centos/boxes/7"
config.vm.host_name = "omnidbuatcentos7"
config.vm.provider :virtualbox do |vb|
vb.name = "omnidb_uat_centos7"
Expand Down
6 changes: 4 additions & 2 deletions OmniDB/OmniDB_app/tests/uat/fedora28/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ SCRIPT

Vagrant.configure("2") do |config|
config.vm.provision "shell", inline: $script
config.vm.box = "wind39/fedora28"
config.vm.box_url = "https://app.vagrantup.com/wind39/boxes/fedora28"
config.vm.box = "Pysis/fedora28-workstation"
config.vm.box_url = "https://app.vagrantup.com/Pysis/boxes/fedora28-workstation"
config.vm.host_name = "omnidbuatfedora28"
config.vm.provider :virtualbox do |vb|
vb.name = "omnidb_uat_fedora28"
vb.gui = true
vb.memory = 1024
vb.cpus = 2
vb.customize ["modifyvm", :id, "--usb", "on"]
vb.customize ["modifyvm", :id, "--usbehci", "off"]
end
end
6 changes: 4 additions & 2 deletions OmniDB/OmniDB_app/tests/uat/fedora29/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ SCRIPT

Vagrant.configure("2") do |config|
config.vm.provision "shell", inline: $script
config.vm.box = "wind39/fedora29"
config.vm.box_url = "https://app.vagrantup.com/wind39/boxes/fedora29"
config.vm.box = "Pysis/fedora29-workstation"
config.vm.box_url = "https://app.vagrantup.com/Pysis/boxes/fedora29-workstation"
config.vm.host_name = "omnidbuatfedora29"
config.vm.provider :virtualbox do |vb|
vb.name = "omnidb_uat_fedora29"
vb.gui = true
vb.memory = 1024
vb.cpus = 2
vb.customize ["modifyvm", :id, "--usb", "on"]
vb.customize ["modifyvm", :id, "--usbehci", "off"]
end
end
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@
- New features:
- Improvements:
- Improved security: disabled TLSv1.0 and TLSv1.1
- App graphical stack upgraded to Electron 4.1 and GTK 3
- Bug fixes:
- Fixed error on EditData when primary key was of type date or timestamp
- Fixed display and handling of array types
- Fixed handling of BC and infinity dates
- Fixed bug involving SELECT INTO statements
- Changes in deployment
- Dropped support for 32 bits builds
- Linux deployment migrated to Docker
- Linux deployment migrated from Vagrant to Docker
- New Vagrant machines for User Acceptance Tests


# 1- Installation
Expand Down

0 comments on commit fcf8010

Please sign in to comment.