-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Always use the copyToImport
logic when running SQL.
#2068
base: master
Are you sure you want to change the base?
Always use the copyToImport
logic when running SQL.
#2068
Conversation
Signed-off-by: Sanjula Ganepola <[email protected]>
Signed-off-by: Sanjula Ganepola <[email protected]>
@SanjulaGanepola This is still in draft. Are we waiting for more from you on this? |
@worksofliam This initial PR was my attempt to create a test to reproduce the issues found in Issue #2059. However, in making this test, I see there is another bug with how the |
@SanjulaGanepola Do you mind if I/we make commits to this PR in order to attempt to fix this issue? To do:
|
@SanjulaGanepola If you do |
Signed-off-by: worksofliam <[email protected]>
I did kind of find part of the problem. The issue is that we were always executing ILE commands using QSH, which seems to break the encoding. If we swap out QSH with PASE, then the encoding is intact and works as expect. Now the issue is that -- set the ccsid
cl: CHGUSRPRF USRPRF(liam) CCSID(273);
select CHARACTER_CODE_SET_ID from table( QSYS2.QSYUSRINFO( USERNAME => upper('liam') ) );
-- create ugly object
cl: CRTLIB LIB("Aܧ#$%Ä") TEXT("§#$öße");
cl: CRTSRCPF FILE("Aܧ#$%Ä"/"àáãÄ£ø") RCDLEN(112) CCSID(273) TEXT("Üä$öß");
cl: ADDPFM FILE("Aܧ#$%Ä"/"àáãÄ£ø") MBR("§#$MAN") SRCTYPE(CBLLE) TEXT("§#$öße");
-- check it exists
cl: CHKOBJ OBJ(QSYS/\"Aܧ#\$%Ä\") OBJTYPE(*LIB) AUT(*NONE);
-- with sql
select
OBJNAME as NAME,
OBJTYPE as TYPE,
OBJATTRIBUTE as ATTRIBUTE,
OBJTEXT as TEXT,
0 as IS_SOURCE,
IASP_NUMBER as IASP_NUMBER,
OBJSIZE as SIZE,
extract(epoch from (OBJCREATED))*1000 as CREATED,
extract(epoch from (CHANGE_TIMESTAMP))*1000 as CHANGED,
OBJOWNER as OWNER,
OBJDEFINER as CREATED_BY
from table(QSYS2.OBJECT_STATISTICS(OBJECT_SCHEMA => '"Aܧ#$%Ä"', OBJTYPELIST => '*LIB')); |
Both of these worked fine for me. -- create ugly object cl: CHGUSRPRF USRPRF(scottf) CCSID(273); |
@forstie can you share the system QCCSID that you ran this on? |
65535 |
Signed-off-by: Sanjula Ganepola <[email protected]>
Signed-off-by: Sanjula Ganepola <[email protected]>
copyToImport
logic when running SQL.
@SanjulaGanepola Is it possible the test case can only pass on a system with a valid QCCSID? I am running this on a 37 and it's not looking too good:
edit: tested on another system also with 65535 and it worked. Confused edit2: solved it. bad user profile |
Signed-off-by: Sanjula Ganepola <[email protected]>
@worksofliam Any update on this PR? |
Changes
The setup I was running against had QCCSID 37. Also, *SECADM is required to run these tests so that the user profile's CCSID can be changed.
@worksofliam As we discussed this PR does not pass yet, due to the failing
checkObject
logic ingetObjectList
:Issue is also reproduceable manually in the object browser:
Checklist
console.log
s I added