bug found in file upload
Moderators: Developer, Contributor
bug found in file upload
1.3.0-rc.2-dev master-9d8d010
place- file upload in comments.
it cant upload because field Content in table bug_file_table now allowed null.
place- file upload in comments.
it cant upload because field Content in table bug_file_table now allowed null.
Re: bug found in file upload
sorry.
its about ms sql 2008 r2 installation.
its about ms sql 2008 r2 installation.
Re: bug found in file upload
I asked as this might be the same issue https://www.mantisbt.org/bugs/view.php?id=20547
Re: bug found in file upload
APPLICATION ERROR #401
error recieved - #515: SQLState: 23000
Error Code: 515
Message: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Cannot insert the value NULL into column 'content', table 'mantisdb.dbo.mantis_bug_file_table'; column does not allow nulls. INSERT fails.
SQLState: 01000
Error Code: 3621
Message: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]The statement has been terminated.
, query: INSERT INTO mantis_bug_file_table ( bug_id, title, description, diskfile, filename, folder,
filesize, file_type, date_added, user_id )
VALUES
( ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ).
for attachments i use option DISK.
$g_file_upload_method = DISK;
this is it.
i have generated this error by setting content = not null.
To make it works i set content allow null.
error recieved - #515: SQLState: 23000
Error Code: 515
Message: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Cannot insert the value NULL into column 'content', table 'mantisdb.dbo.mantis_bug_file_table'; column does not allow nulls. INSERT fails.
SQLState: 01000
Error Code: 3621
Message: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]The statement has been terminated.
, query: INSERT INTO mantis_bug_file_table ( bug_id, title, description, diskfile, filename, folder,
filesize, file_type, date_added, user_id )
VALUES
( ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ).
for attachments i use option DISK.
$g_file_upload_method = DISK;
this is it.
i have generated this error by setting content = not null.
To make it works i set content allow null.
Re: bug found in file upload
APPLICATION ERROR #401
Запрос к базе данных не удался. Получена ошибка - #515: SQLState: 23000
Error Code: 515
Message: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Cannot insert the value NULL into column 'content', table 'mantisdb.dbo.mantis_bug_file_table'; column does not allow nulls. INSERT fails.
SQLState: 01000
Error Code: 3621
Message: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]The statement has been terminated.
, запрос: INSERT INTO mantis_bug_file_table ( bug_id, title, description, diskfile, filename, folder,
filesize, file_type, date_added, user_id )
VALUES
( 9192, '', '', '90edf77af97b41c307368a0633b61ef4', 'desktop.ini', 'I:\inetpub\wwwroot\mantis\mantis.attach\', 178, 'application/octet-stream', 1454324637, 4 ).
Column @Content@ is not used in SQL query, but in table has NOT NULL.
more detailed.
Запрос к базе данных не удался. Получена ошибка - #515: SQLState: 23000
Error Code: 515
Message: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Cannot insert the value NULL into column 'content', table 'mantisdb.dbo.mantis_bug_file_table'; column does not allow nulls. INSERT fails.
SQLState: 01000
Error Code: 3621
Message: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]The statement has been terminated.
, запрос: INSERT INTO mantis_bug_file_table ( bug_id, title, description, diskfile, filename, folder,
filesize, file_type, date_added, user_id )
VALUES
( 9192, '', '', '90edf77af97b41c307368a0633b61ef4', 'desktop.ini', 'I:\inetpub\wwwroot\mantis\mantis.attach\', 178, 'application/octet-stream', 1454324637, 4 ).
Column @Content@ is not used in SQL query, but in table has NOT NULL.
more detailed.
Re: bug found in file upload
its not about SQL SERVER USERS. its about constraint and $g_file_upload_method=DISK
bug_file_table has constaint on Content field=(NOT NULL)
mantis generate dynamic sql where is no Content field.
so?
SQL SERVER doesnt allow to insert row where is no value for Content field.
that is it.
workaround :
drop constraint on Content field. i did that and its ok now.
bug_file_table has constaint on Content field=(NOT NULL)
mantis generate dynamic sql where is no Content field.
Code: Select all
INSERT INTO mantis_bug_file_table ( bug_id, title, description, diskfile, filename, folder,
filesize, file_type, date_added, user_id )
SQL SERVER doesnt allow to insert row where is no value for Content field.
Code: Select all
Cannot insert the value NULL into column 'content', table 'mantisdb.dbo.mantis_bug_file_table'; column does not allow nulls
workaround :
drop constraint on Content field. i did that and its ok now.
Re: bug found in file upload
That's why I wroteAlexeiK wrote:its not about SQL SERVER USERS.
The proposed fix for it might also fix your issue.atrol wrote:I asked as this might be the same issue https://www.mantisbt.org/bugs/view.php?id=20547
Re: bug found in file upload
u r right.
this is it.
this is it.
-
- Posts: 2
- Joined: 13 Jun 2016, 08:09
Re: bug found in file upload
Have you set mode STRICT_ALL_TABLES in MySQL?