DBD-mysql

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

		Posted notice of approaching doom to perldb-interest.

20/07/95:01:25	Fetching appears to work OK now. I need to read the API on
		msqlFieldSeek, since I can't work out why fetch is returning
		the same row over and over!

21/07/95:09:22  Added a field into imp_sth (currow) which keeps track of the
                current row that's been fetched from the result struct. If I
                can fix the return codes coming from fetchrow, it'll work!

21/07/95:10:30  Pondered bind variables in cursors. Since there isn't a bind
                function in the API, I may have to frig the way that prepare/
                execute works, ie, move the call to msqlQuery *after* it's
                done some parsing for bind values......Hm.

21/07/95:10:35  Twiddled some bits in the fetchrow cycle.

23/07/95:15:50  Fetch is fetching a row, but it's not returning it to the
        	calling cycle, so I need to fart about with the sv stuff, which
		is not amusing me greatly!

dbdimp.c  view on Meta::CPAN


}

/*
  We have to fetch all data from stmt
  There is may be useful for 2 cases:
  1. st_finish when we have undef statement
  2. call st_execute again when we have some unfetched data in stmt
 */

int mysql_st_clean_cursor(SV* sth, imp_sth_t* imp_sth) {

  if (DBIc_ACTIVE(imp_sth) && dbd_describe(sth, imp_sth) &&
      !imp_sth->fetch_done)
    mysql_stmt_free_result(imp_sth->stmt);
  return 1;
}

/***************************************************************************
 *
 *  Name:    dbd_st_finish

dbdimp.c  view on Meta::CPAN


  if (DBIc_TRACE_LEVEL(imp_xxh) >= 2)
  {
    PerlIO_printf(DBIc_LOGPIO(imp_xxh), "\n--> dbd_st_finish\n");
  }

  if (imp_sth->use_server_side_prepare)
  {
    if (imp_sth && imp_sth->stmt)
    {
      if (!mysql_st_clean_cursor(sth, imp_sth))
      {
        do_error(sth, JW_ERR_SEQUENCE,
                 "Error happened while tried to clean up stmt",NULL);
        return 0;
      }
    }
  }

  /*
    Cancel further fetches from this cursor.
    We don't close the cursor till DESTROY.
    The application may re execute it.
  */
  if (imp_sth && DBIc_ACTIVE(imp_sth))
  {
    /*
      Clean-up previous result set(s) for sth to prevent
      'Commands out of sync' error
    */
    mysql_st_free_result_sets(sth, imp_sth);
  }

dbdimp.h  view on Meta::CPAN

                                       int);

my_ulonglong mysql_st_internal_execute41(SV *,
                                         int,
                                         MYSQL_RES **,
                                         MYSQL_STMT *,
                                         MYSQL_BIND *,
                                         int *);


int mysql_st_clean_cursor(SV*, imp_sth_t*);

int mysql_st_next_results(SV*, imp_sth_t*);

AV* dbd_db_type_info_all (SV* dbh, imp_dbh_t* imp_dbh);
SV* dbd_db_quote(SV*, SV*, SV*);
extern MYSQL* mysql_dr_connect(SV*, MYSQL*, char*, char*, char*, char*, char*,
			       char*, imp_dbh_t*);

extern int mysql_db_reconnect(SV*);
int mysql_st_free_result_sets (SV * sth, imp_sth_t * imp_sth);



( run in 0.241 second using v1.01-cache-2.11-cpan-4d50c553e7e )