Raised This Month: $32 Target: $400
 8% 

Can Someone Reproduce this SQL issue??


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
scorpius2k1
Senior Member
Join Date: Feb 2016
Old 06-18-2017 , 13:21   Can Someone Reproduce this SQL issue??
Reply With Quote #1

Edit: after further discussion on SourcePawn's GitHub, this is actually a compiler bug.
https://github.com/alliedmodders/sourcepawn/issues/122

...

I am using the latest SourceMod, Linux Server, Half-Life 2: DM. I am simply trying to create a database, and it does, but for some reason, if I use a timer, and then call StrEqual...it makes a SECOND empty database with whatever name is in the first field of "StrEqual"

Here is an image from FTP showing the two files being made:
http://imgur.com/GFSrYC2l.png

The code below will reproduce it...

PHP Code:
#include <sourcemod>

new Handle:g_hDB INVALID_HANDLE;

public 
OnPluginStart()
{
    
InitDB();
    
CreateTimer(3.0wtf_is_going_on);
}

stock Action:wtf_is_going_on(Handle:timer)
{
    if(
StrEqual("it_makes_an_empty_database_with_whatever_is_here""")) {}
}

stock InitDB()
{
    new 
String:error[255];
    
g_hDB SQLite_UseDatabase("my_database"errorsizeof(error));


Last edited by scorpius2k1; 06-19-2017 at 09:55.
scorpius2k1 is offline
Miu
Veteran Member
Join Date: Nov 2013
Old 06-18-2017 , 13:51   Re: Can Someone Reproduce this SQL issue??
Reply With Quote #2

cba to start a server and try running that, but I compiled it with spcomp 1.8.0.5967 and then fed that to Lysis, and it gives me back https://pastebin.com/raw/Ti5CwMq0, which is pretty funny. not sure what went wrong there, but you should def file a bug on the issues page.

Last edited by Miu; 06-18-2017 at 13:56.
Miu is offline
scorpius2k1
Senior Member
Join Date: Feb 2016
Old 06-18-2017 , 15:14   Re: Can Someone Reproduce this SQL issue??
Reply With Quote #3

Quote:
Originally Posted by Miu View Post
cba to start a server and try running that, but I compiled it with spcomp 1.8.0.5967 and then fed that to Lysis, and it gives me back https://pastebin.com/raw/Ti5CwMq0, which is pretty funny. not sure what went wrong there, but you should def file a bug on the issues page.
Thank you for verifying it wasn't just my end, appreciate it! I did as suggested and submitted and issue report on the SM GitHub

https://github.com/alliedmodders/sourcepawn/issues/122

Hopefully some light will be shed on this very strange problem
scorpius2k1 is offline
scorpius2k1
Senior Member
Join Date: Feb 2016
Old 06-18-2017 , 19:45   Re: Can Someone Reproduce this SQL issue??
Reply With Quote #4

Issue is solved.

simply needed to change the timer from a stock action to a public action



PHP Code:
public Action:wtf_is_going_on(Handle:timer

    if(
StrEqual("it_makes_an_empty_database_with_whatever_is_here""")) {} 


Very weird that it would cause that kind of an "issue", but that fixed it perfectly


Edit: after further discussion on SourcePawn's GitHub, this is actually a compiler bug.
https://github.com/alliedmodders/sourcepawn/issues/122

.

Last edited by scorpius2k1; 06-19-2017 at 09:52.
scorpius2k1 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:22.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode