comanage-dev - Re: [comanage-dev] CO-1441 escape or avoid reserved SQL words ?
Subject: COmanage Developers List
List archive
- From: Tom Zeller <>
- To: Benn Oshrin <>
- Cc:
- Subject: Re: [comanage-dev] CO-1441 escape or avoid reserved SQL words ?
- Date: Wed, 7 Jun 2017 19:32:00 -0500
- Ironport-phdr: 9a23:8Dzw/xNgmR2BZa096/ol6mtUPXoX/o7sNwtQ0KIMzox0I/n/rarrMEGX3/hxlliBBdydsKMbzbSM+Py6EUU7or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQtFiT6/bL9oLRi6swrdu8YIjYB/Nqs/1xzFr2dSde9L321oP1WTnxj95se04pFu9jlbtuwi+cBdT6j0Zrw0QrNEAjsoNWA1/9DrugLYTQST/HscU34ZnQRODgPY8Rz1RJbxsi/9tupgxCmXOND9QL4oVTi+6apgVQTlgzkbOTEn7G7Xi9RwjKNFrxKnuxx/2JPfbIWMOPZjYq/RYdYWSGxcVchTSiNBGJuxb4oNAOoPPehWoYrzqUYQoxSiHgSsGP/jxyVUinPqwaE30eIsGhzG0gw6GNIOtWzZosvyNKcXTOu6z7fHzTHHb/xIwzf29Y/FcgwgoP6SWbJwddTeyVM0GgPellWQqZLqPymU1usRqWeb6/ZvVeWhim4osQFxpSWvxt82hobVgYIVz0nJ+CNky4g7It24TVR0Yd+iEJZItiGaMZd2Td04Q2Fupik61qMKtYSlcycX1ZQr3xHfa/2bc4iI/xLsT/ydLit/hHJgfr+0mhW88VC4x+HiV8S4zFRHoy9LktTPrX8Byxne58ebRvdh40is3CqA2xzO5exBJE04i7TXJIU5zrMymZcfq1nPEy3ylUnsg6Kaa18o9va25+j5ZLjtu4WSOJVuig7kN6Qjgsy/Dvo8MggJR2Wb/P6z1Lzn/UHgWbVKkuE6nrDWsZzEO8gUvbS1AwBS0oYk5Ba/Cymp3M4EknkAKVJJYBOHj473NFHSOP30E/ayj0iunTpuyfDLPabuDonII3XMjLvtYaty5ktAxwYv0N9S4pdZBq8fLP3oQkPxscbXDh49Mwy62ebnD9B925sCWWOOHKCZNKfSvkGS5u80OOmMfI8VtyjnK/gk+/Hhl3s5lkMafain0psXcne4Hul+I0mDfXXshdIBHX8QvgUiVOzqlEGCUTlLanmuWKI84ys0CIS8AofMWI+hmaGO0zmlHpBNYmBGC0uMEWvzd4maQfsMaSSSItN/nTweU7iuVZMh2Q+0uADk1rVnM7mcxipNn5/l0pBS/O3JlBd6oTZ5CcKa+2CLU2xumG4UHXk70L0p8mJnzVLW7a99y85VEdhe/bsdThU3MZrR1cRhE9D/QAPKd9OCT0mpWNK7GXc6SddnkIxGWFp0B9j31kOL5CGtGbJA0uXTXJE=
> Cake 3 has a quoteIdentifier() function on the database driver that does
> that, but Cake 2 does not appear to have an equivalent. As such, for now
> I don't think we can quote keywords since we don't want to hack around
> in the core code. We should file a JIRA for FUTURE and have it depend on
> CO-1073.
Okay, will do.
> That leaves us with two options:
>
> (1) Maintain a list of reserved keywords and write a custom validator.
> (2) Update the documentation to say "don't use a reserved keyword".
I'd update the wiki but I don't have access to spaces.internet2.edu, sigh.
> Maybe also put a note in the appropriate form field.
https://github.com/Internet2/comanage-registry/pull/23
> I'm inclined to go with (2). This is an edge case.
Agree. The list of reserved keywords would probably eventually get stale
anyway.
> It appeared CO-1441 actually had a second issue (table already exists)
> reported? Or maybe that got covered by a separate ticket?
Same issue. The check for whether or not to create the table is done
by counting cm_co_extended_attributes, which will be 0 if "starting
from scratch" and then trying to create an extended attribute using a
reserved word. I guess the logic could be improved when deciding
whether or not to create the table, but that won't fix the use of a
reserved word, so I don't think time should be spent on it.
Tom
- [comanage-dev] CO-1441 escape or avoid reserved SQL words ?, Tom Zeller, 06/05/2017
- Re: [comanage-dev] CO-1441 escape or avoid reserved SQL words ?, Benn Oshrin, 06/07/2017
- Re: [comanage-dev] CO-1441 escape or avoid reserved SQL words ?, Tom Zeller, 06/08/2017
- Re: [comanage-dev] CO-1441 escape or avoid reserved SQL words ?, Tom Zeller, 06/08/2017
- Re: [comanage-dev] CO-1441 escape or avoid reserved SQL words ?, Tom Zeller, 06/08/2017
- Re: [comanage-dev] CO-1441 escape or avoid reserved SQL words ?, Benn Oshrin, 06/07/2017
Archive powered by MHonArc 2.6.19.