Re: help with mysql

Mike Aubury <[email protected]>
Newsgroups gmane.comp.lang.4gl.aubit.general
Message-ID <CAGAq4WGAvxg4atULExCBOK=da27Qef=mjcZbsRp9JvNE_QhQ9w@mail.gmail.com>
First thing...


LOCK TABLE compras IN SHARE MODE

is being converted to

LOCK TABLES c READ

Looks to be a typo in lib/libaubit4gl/sqlconvert.c where it was
looking for a "%S" [ capital ] - not a "%s" [ not capital ].


That should be fixed now in CVS now - if you want to update..
(If you want to just fix that one issue - just look for the "%S" in
A4GL_strwscmp function (around line 2412) and change it to a %s


Should that be "LOCK TABLE compras READ", not "LOCK TABLES compras
READ" anyway ?






On 17 September 2015 at 18:10, Herman Carrion L.
<[email protected]> wrote:
> Hi everyone.
> I edited the file ./aubit4glrc/etc/convertsql/INFORMIX-MYSQLDIRECT.cnv and
> added line:
> REPLACE_COMMAND LOCK TABLE %s IN SHARE MODE = LOCK TABLES %s READ
> And this is my code:
> ----------
> MAIN
> DATABASE agualife
> CLEAR SCREEN
> DISPLAY "LOCK TEST IN MYSQL" AT 10,10
>
> BEGIN WORK
> SET LOCK MODE TO WAIT
> LOCK TABLE compras IN SHARE MODE
>         SELECT * FROM compras
> COMMIT WORK
> END MAIN
> ----------
> No errors in compilation, but when you run the program I have the following
> error:
> Err:Program ./lock stopped at 'lock.4gl', line number 8.
> Erros status number -206
> Table 'agualife.c' doesn't exist
> 4gl function call stack:
>    MAIN
>
> The debug file:
>
> sqlconvert.c         1069   dbg (     0,     0,0) A4GLSQLCV_check_sql
> ()  check sql : LOCK TABLE compras IN SHARE MODE
> sqlconvert.c         349    dbg (     0,     0,0) A4GL_convert_sql_new
> ()  check_sql.. LOCK TABLES c READ
> mem.c                171    dbg (     0,     0,0) acl_free_full
> ()  Free 0x2395320 sqlconvert.c 355
> mem.c                171    dbg (     0,     0,0) acl_free_full
> ()  Free 0x23952f0 sqlconvert.c 357
> API_sql.c            714    dbg (     0,     0,0) A4GLSQL_fixup_descriptor
> ()  Call to char* A4GLSQL_fixup_descriptor((a4gl_st_lock_4g
> l_9)))
> API_sql.c            722    dbg (     0,     0,0) A4GLSQL_fixup_descriptor
> ()  Returning (a4gl_st_lock_4gl_9)
> sql_common.c         2753   dbg (     0,     0,0) A4GL_free_prepare
> ()  free prepare :
> API_sql.c            412    dbg (     0,     0,0)
> A4GLSQL_free_prepare_internal()  Call to void
> A4GLSQL_free_prepare_internal(0x2392cc
> 0)
> mem.c                171    dbg (     0,     0,0) acl_free_full
> ()  Free 0x2382030 mysql.c 3091
> mem.c                171    dbg (     0,     0,0) acl_free_full
> ()  Free 0x2393220 mysql.c 3093
> mem.c                171    dbg (     0,     0,0) acl_free_full
> ()  Free 0x2393240 mysql.c 3096
> API_sql.c            499    dbg (     0,     0,0)
> A4GLSQL_prepare_select_internal()  Call to void*
> A4GLSQL_prepare_select_internal((ni
> l),0,(nil),0,(LOCK TABLES c READ)),(a4gl_st_lock_4gl_9)),0)
> mysql.c              1218   dbg (     0,     0,0)
> A4GLSQLLIB_A4GLSQL_prepare_select_internal()  Err : This command is not
> supported in
>  the prepared statement protocol yet (0x2396310)
> sql_common.c         314    dbg ( -1295, -1295,0) A4GL_set_status
> ()  A4GL_set_status(-1295,1)
> sql_common.c         326    dbg ( -1295, -1295,1) A4GL_set_status
> ()  Status set to -1295
> API_sql.c            507    dbg ( -1295, -1295,1)
> A4GLSQL_prepare_select_internal()  Returning (0x2392cc0)
> sql_common.c         1125   dbg ( -1295, -1295,1)
> A4GL_addPreparedStatement()  npreparedStatements=1
> API_sql.c            386    dbg ( -1295, -1295,1)
> A4GLSQL_execute_implicit_sql()  Call to int
> A4GLSQL_execute_implicit_sql(0x2392cc0,1
> ,0,(nil))
> mysql.c              2346   dbg ( -1295, -1295,1)
> A4GLSQLLIB_A4GLSQL_execute_implicit_sql()  A4GLSQL_execute_implicit_sql:
> no=0 ni=0 s
> ql=LOCK TABLES c READ
> mysql.c              2358   dbg ( -1295, -1295,1)
> A4GLSQLLIB_A4GLSQL_execute_implicit_sql()  Execute : LOCK TABLES c READ with
> 0 param
> eters
> sql_common.c         308    dbg (     0,     0,1) A4GL_set_status
> ()  set_status: errflg is set - not setting new status 0
> mysql.c              2136   dbg (     0,     0,1) execute_sql
> ()  Error : Table 'agualife.c' doesn't exist
> sql_common.c         308    dbg (  -206,  -206,1) A4GL_set_status
> ()  set_status: errflg is set - not setting new status -206
> API_sql.c            394    dbg (  -206,  -206,1)
> A4GLSQL_execute_implicit_sql()  Returning '1'
> fglwrap.c            656    dbg (  -206,  -206,1) A4GL_chk_err
> ()  Checking exit status 9 lock.4gl
> err.c                81     dbg (  -206,  -206,1) A4GL_err_print
> ()  In err print -206 Table 'agualife.c' doesn't exist
> err.c                119    dbg (  -206,  -206,1) A4GL_err_print
> ()  Calling get_errmsg
> error.c              290    dbg (  -206,  -206,1) A4GL_get_errmsg
> ()  In get errm
> error.c              301    dbg (  -206,  -206,1) A4GL_get_errmsg
> ()  Looking up error... 0
> error.c              311    dbg (  -206,  -206,1) A4GL_get_errmsg
> ()  Not found...
> API_sql.c            580    dbg (  -206,  -206,1) A4GLSQL_get_errmsg
> ()  Call to char* A4GLSQL_get_errmsg(-206)
> API_sql.c            588    dbg (  -206,  -206,1) A4GLSQL_get_errmsg
> ()  Returning (Table 'agualife.c' doesn't exist)
> error.c              317    dbg (  -206,  -206,1) A4GL_get_errmsg
> ()  Returning A4GLSQL_get_errmsg ""
> err.c                123    dbg (  -206,  -206,1) A4GL_err_print
> ()  Got Table 'agualife.c' doesn't exist
> API_ui.c             1089   dbg (  -206,  -206,1) A4GL_gotolinemode
> ()  Call to void A4GL_gotolinemode()
> fglwrap.c            696    dbg (  -206,  -206,1) A4GL_chk_err
> ()  Error...
> fglwrap.c            699    dbg (  -206,  -206,1) A4GL_chk_err
> ()  Write error to screen...
> fglwrap.c            712    dbg (  -206,  -206,1) A4GL_chk_err
> ()  Program ./lock stopped at 'lock.4gl', line number 9.
> Error status number -206.
> Table 'agualife.c' doesn't exist.
>
> 4gl function call stack :
>     MAIN
> fglwrap.c            745    dbg (  -206,  -206,1) A4GL_chk_err
> ()  Close errlog
> builtin.c            1069   dbg (  -206,  -206,1) A4GL_close_errorlog_file
> ()  Close_errlog_file
> API_ui.c             1551   dbg (  -206,  -206,1) A4GL_ui_exit
> ()  Call to void A4GL_ui_exit(1)
> builtin.c            1069   dbg (  -206,  -206,1) A4GL_close_errorlog_file
> ()  Close_errlog_file
> common_ui.c          68     dbg (  -206,  -206,1) A4GL_fgl_die
> ()  End of program - exit(1).
> sistemas@sistemas:~/Agualife/TUI/4gl$
>
> The help of all my friend who use aubit4gk requested.
> Greetings and thanks to all.
> Herman.
>
>
>
> ------------------------------------------------------------------------------
> Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
> Get real-time metrics from all of your servers, apps and tools
> in one place.
> SourceForge users - Click here to start your Free Trial of Datadog now!
> http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
> _______________________________________________
> Aubit4gl-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss
>

------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.