Subject: The mailing list for listmasters using Sympa
List archive
Re: [sympa-users] Questions on DB structure change
- From: Olivier Salaün - CRU <address@concealed>
- To: Brian Riffle <address@concealed>
- Cc: address@concealed
- Subject: Re: [sympa-users] Questions on DB structure change
- Date: Tue, 27 Dec 2005 12:07:56 +0100
This problem is due to the subscribed and included DB fields represented with different data types depending on the RDBMS. We had to do so because not all RDBMS provide a proper boolean type. With mysql the data type used is enum('0','1') whereas we use a numeric with Sybase. Before inserting data we quote them, but it is not suitable for a numeric type.
I've patched both our stable and development branches to use the quote() function only when apropriate and I also moved some mysql data fields from enum('0','1') to int(1).
Here is the patch :
http://sourcesup.cru.fr/cgi/viewcvs.cgi/sympa/src/List.pm?only_with_tag=sympa-5_1-branch&r2=1.550.2.15&r1=1.550.2.14&makepatch=1&diff_format=u
Brian Riffle wrote:
Thank you for such a quick reply. I have re-installed sympa (since its just a test box right now) with the new List.pm. Unfortunately, it appears that there is a problem still with List.pm. I am getting an error:
Dec 16 10:38:55 mail2 task_manager[24391]: Unable to execute SQL statement "INSERT INTO admin_table (user_admin, comment_admin, list_admin, date_admin, update_admin, reception_admin,subscribed_admin,included_admin,include_sources_admin, role_admin, info_admin, profile_admin) VALUES ('address@concealed', 'Brian Riffle', 'kccannouncements', dateadd(second,1134758335,"01/01/1970"), dateadd(second,1134758335,"01/01/1970"), 'mail', '1', NULL, NULL, 'owner', NULL, 'privileged')" : Server message number=257 severity=16 state=1 line=1 text=Implicit conversion from datatype 'VARCHAR' to 'NUMERIC' is not allowed. Use the CONVERT function to run this query.
I have found this on line 5277 of List.pm. It appears to be the same issue, it is treating the value as a char, not as numeric. It appears to be: $dbh->quote($new_admin_user->{'subscribed'}). It has been a long time since I have used Perl, and am not sure how to modify this to make it not do the quotes.
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature
-
[sympa-users] Questions on DB structure change,
Brian Riffle, 12/09/2005
-
Re: [sympa-users] Questions on DB structure change,
Olivier Salaün - CRU, 12/12/2005
-
[sympa-users] Questions on DB structure change,
Brian Riffle, 12/16/2005
-
[sympa-users] date on archive is incorrect,
Phillip_James, 12/16/2005
- Re: [sympa-users] date on archive is incorrect, Sergiy Zhuk, 12/16/2005
- Re: [sympa-users] Questions on DB structure change, Olivier Salaün - CRU, 12/27/2005
-
[sympa-users] date on archive is incorrect,
Phillip_James, 12/16/2005
-
[sympa-users] Questions on DB structure change,
Brian Riffle, 12/16/2005
-
Re: [sympa-users] Questions on DB structure change,
Olivier Salaün - CRU, 12/12/2005
Archive powered by MHonArc 2.6.19+.