Menu

about server side insert

2010-12-28
2013-04-26
  • Piao songmei

    Piao songmei - 2010-12-28

    about server side insert, at function of locator_attribute_info_force() there're following codes:

    locator_attribute_info_force()
    {
      ......
      switch (operation)
      {
        case LC_FLUSH_UPDATE:
          ...
          break;
        case LC_FLUSH_INSERT:
          ...
          if (operation == LC_FLUSH_INSERT)
          {
            ...
          }
          else
          {
            assert (operation == LC_FLUSH_UPDATE)
            ...
          }
      }
    }
    

    in case of LC_FLUSH_INSERT why judged again operation?

     
  • Kieun Park

    Kieun Park - 2010-12-28

    You can see that there is no "break" statement in the end of the first "case LC_FLUSH_UPDATE" block.
    See the comment there… /* Fall through */

    Thanks.

     
  • Kieun Park

    Kieun Park - 2010-12-28

    One more thing.
    Actually, those code is not related with "server-side insert" feature. They are related with "client-side insert".
    As the CuBRID's terminology, "server-side insert" means that INSERT_PROC XASL.
    "Client-side insert" means that calling locator_force() to flush out the object to the server.

     
  • Piao songmei

    Piao songmei - 2010-12-28

    oops, my mistake.
    thank you for your explain.

    and for client side insert / server side insert:
    in case of server side insert, it's also called locator_insert_force().  the stack is as bellow:
              qexec_execute_insert() -> locator_attribute_info_force() -> locator_insert_force()
    in case of client side insert, the stack is:
              xlocator_force() -> locator_insert_force()

    in server side insert, it's also prepared copy area and flushed to server.

     
  • Kieun Park

    Kieun Park - 2010-12-29

    Yes. You're right. "locator_attribute_info_force()" is called also during server-side insert. I'm confused with somewhat.
    Thanks.

     
  • Piao songmei

    Piao songmei - 2010-12-29

    thank you

     

Log in to post a comment.