Пример #1
0
//From Prepare to Commit(Update
int UpdateTest(SQLHANDLE henv, SQLHANDLE hdbc, SQLHANDLE hstmt)
{
		
  int rc,i;
  int iHolder;
  char sHolder[200];
  char sData[200];

  timer.reset();
  for(i=0;i<ITERATION;i++){
  timer.start();
    rc = SQLPrepare (hstmt,
		   (unsigned char *) "UPDATE t1 SET f2 = ? WHERE f1 = ?",
		   SQL_NTS);
    checkrc (rc, __LINE__);
    SQLINTEGER sLen = SQL_NTS;
    rc = SQLBindParameter (hstmt, 1, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR,
			 196, 0, (void *) sHolder, 0, &sLen);
    checkrc (rc, __LINE__);
    rc = SQLBindParameter (hstmt, 2, SQL_PARAM_INPUT, SQL_C_LONG, SQL_INTEGER,
			 0, 0, &iHolder, 0, NULL);
    checkrc (rc, __LINE__);
    iHolder = 0;
    strcpy (sData, "9876543210987654321098765432109876543210");

	  iHolder = i ;
	  strcpy (sHolder, sData);
	  rc = SQLExecute (hstmt);
	  checkrc (rc, __LINE__);
	  rc = SQLTransact (henv, hdbc, SQL_COMMIT);
	  checkrc (rc, __LINE__);
	  timer.stop ();
     }
     printf ("Update: %lld  %lld  %lld\n", timer.minc (), timer.maxc (),timer.avg ());
}
Пример #2
0
//From prepare to commit(Delete)
int DeleteTest(SQLHANDLE henv, SQLHANDLE hdbc, SQLHANDLE hstmt)
{
  int rc,i;
  int iHolder;
       timer.reset();
       for(i=0;i<ITERATION;i++){
       timer.start();
       rc = SQLPrepare (hstmt, (unsigned char *)"DELETE FROM t1 WHERE f1 = ?", SQL_NTS);
       checkrc (rc, __LINE__);
       rc = SQLBindParameter (hstmt, 1, SQL_PARAM_INPUT, SQL_C_LONG, SQL_INTEGER,
			 0, 0, &iHolder, 0, NULL);
       checkrc (rc, __LINE__);
       
       iHolder = 0;
       int tCount;
  
	  iHolder = i ;
	  rc = SQLExecute (hstmt);
	  checkrc (rc, __LINE__);
	  rc = SQLTransact (henv, hdbc, SQL_COMMIT);
	  checkrc (rc, __LINE__);

	  timer.stop ();
  }
  printf ("Delete: %lld  %lld  %lld\n", timer.minc (), timer.maxc (),timer.avg ());
  return 0;
}
Пример #3
0
int
runReadTest (SQLHANDLE henv, SQLHANDLE hdbc, SQLHANDLE hstmt)
{
  int iHolder;
  char sHolder[200];
  char sData[200];

  int tempTermVar = 0;
  int tempTermVal = 0;
  int rc;

  /* Set read-only transaction type */
  readOnlyTrans (hdbc);
  rc = SQLPrepare (hstmt, (unsigned char *)
		   "SELECT f1, f2 FROM t1 where f1 = ?", SQL_NTS);
  checkrc (rc, __LINE__);
  long sz = 0;
  rc = SQLBindParameter (hstmt, 1, SQL_PARAM_INPUT, SQL_C_LONG, SQL_INTEGER,
			 0, 0, &tempTermVar, 0, NULL);
  checkrc (rc, __LINE__);
  rc = SQLBindCol (hstmt, 1, SQL_INTEGER, &iHolder, 0, NULL);
  checkrc (rc, __LINE__);
  rc = SQLBindCol (hstmt, 2, SQL_C_CHAR, sHolder, sizeof (sHolder), NULL);
  checkrc (rc, __LINE__);
  iHolder = 0;
  strcpy (sData, "0123456789012345678901234567890123456789");

  int i, j, k;
  int tCount;

  timer.reset ();

  /* Run 1per Test */
  for (i = 0; i < ITERATION; i++)
    {
	  timer.start ();
	  tempTermVar = i ;
	  rc = SQLExecute (hstmt);
	  checkrc (rc, __LINE__);
	  rc = SQLFetch (hstmt);
	  checkrc (rc, __LINE__);
	  tempTermVal = iHolder;
	  strcpy (sData, sHolder);
	  rc = SQLCloseCursor (hstmt);
	  checkrc (rc, __LINE__);
	  rc = SQLTransact (henv, hdbc, SQL_COMMIT);
	  checkrc (rc, __LINE__);
	  timer.stop ();
    }
  printf ("Read: 1 %lld %lld %lld\n", timer.minc (), timer.maxc (),
	  timer.avg ());
  /* Set read-write transaction type */
  readWriteTrans (hdbc);
  return rc;
}
Пример #4
0
int
runInsertTest (SQLHANDLE henv, SQLHANDLE hdbc, SQLHANDLE hstmt)
{
  int rc;
  int iHolder;
  char sHolder[200];
  char sData[200];

  iHolder = 0;
  strcpy (sData, "0123456789012345678901234567890123456789");
  rc = SQLPrepare (hstmt, (unsigned char *) "INSERT INTO t1 VALUES (?, ?)",
		   SQL_NTS);
  checkrc (rc, __LINE__);
  rc = SQLBindParameter (hstmt, 1, SQL_PARAM_INPUT, SQL_C_LONG, SQL_INTEGER,
			 0, 0, &iHolder, 0, NULL);
  checkrc (rc, __LINE__);
  SQLINTEGER sLen = SQL_NTS;
  rc = SQLBindParameter (hstmt, 2, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR,
			 196, 0, (void *) sHolder, 0, &sLen);
  checkrc (rc, __LINE__);
  int i, j, k;
  int tCount;

  timer.reset ();

  /* Run 1per Test */
  for (i = 0; i < ITERATION; i++)
    {
	  timer.start ();
	  iHolder = i ;
	  strcpy (sHolder, sData);
	  rc = SQLExecute (hstmt);
	  checkrc (rc, __LINE__);
	  rc = SQLTransact (henv, hdbc, SQL_COMMIT);
	  checkrc (rc, __LINE__);
	  timer.stop ();
    }

  printf ("Insert: 1 %lld %lld %lld\n", timer.minc (), timer.maxc (),
	  timer.avg ());

  return 0;

}
Пример #5
0
int main()
{

    Connection conn;
    DbRetVal rv = conn.open("root", "manager");
    if (rv != OK)
    {
       printf("Error during connection %d\n", rv);
       return -1;
    }


    DatabaseManager *dbMgr = conn.getDatabaseManager();
    if (dbMgr == NULL) { printf("Auth failed\n"); return -1;}
    TableDef tabDef;
    tabDef.addField("f1", typeInt, 0, NULL, true );
    tabDef.addField("f2", typeString, 196);
    rv = dbMgr->createTable("t1", tabDef);
    if (rv != OK) { printf("Table creation failed\n"); return -1; }
    printf("Table created\n");
    HashIndexInitInfo *idxInfo = new HashIndexInitInfo();
    strcpy(idxInfo->tableName, "t1");
    idxInfo->list.append("f1");
    idxInfo->indType = hashIndex;
    if (LOAD >0 )
       idxInfo->bucketSize = 100007;
    else
       idxInfo->bucketSize = 10007;
    rv = dbMgr->createIndex("indx1", idxInfo);
    if (rv != OK) { printf("Index creation failed\n"); return -1; }
    printf("Index created\n");
    delete idxInfo;
    Table *table = dbMgr->openTable("t1");
    if (table == NULL) { printf("Unable to open table\n"); return -1; }
    int id = 0;
    char name[196] = "PRABAKARAN";
    table->bindFld("f1", &id);
    table->bindFld("f2", name);
    char *tuple;
    int ret;
    int i;
    int icount =0;
    if (LOAD > 0) {
      TableImpl *impl = (TableImpl*)table;
      impl->setUndoLogging(false);
      strcpy(name, "PRABAKARAN0123456750590");
      rv = conn.startTransaction();
      if (rv != OK) exit(1);
      for(i = 0; i< LOAD; i++)
      {
        id= i;
        ret = table->insertTuple();
        if (ret != 0) break;
        icount++;
        if (i % 100 == 0 ) { rv = conn.commit(); 
                             if (rv != OK) exit(1);
                             rv = conn.startTransaction(); 
                             if (rv != OK) exit(1);
                           }
        if (i %50000 == 0) printf("%d rows inserted\n", i);
      }
      conn.commit();
      impl->setUndoLogging(true);
      printf("Loaded %d records\n", icount);
    }
   
      //TableImpl *impl = (TableImpl*)table;
      //impl->setUndoLogging(false);
    i = 0; 
    NanoTimer timer;
    icount =0;
    for(i = LOAD; i< LOAD+ITERATIONS; i++)
    {
        timer.start();
        rv = conn.startTransaction();
        if (rv != OK) exit(1);
        id= i;
        strcpy(name, "PRABAKARAN0123456750590");
        ret = table->insertTuple();
        if (ret != 0) break;
    //    printf("%d\n ", i);
        icount++;
        conn.commit();
        timer.stop();
    }
   printf("%d rows inserted %lld %lld %lld\n",icount, timer.minc(), timer.maxc(), timer.avg());

    int offset1= os::align(sizeof(int));
    Condition p1;
    int val1 = 0;
    p1.setTerm("f1", OpEquals, &val1);
    table->setCondition(&p1);
    icount=0;
   

    timer.reset();
    for(i = LOAD; i< LOAD+ITERATIONS; i++)
    {    
        timer.start();
        rv =conn.startTransaction();
        if (rv != OK) exit(1);
        val1 = i;
        table->execute();
        tuple = (char*)table->fetch() ;
        if (tuple == NULL) {printf("loop break in %d\n", i);table->closeScan();break;}
  //      printf(" %d tuple value is %d %s \n", i, *((int*)tuple), tuple+offset1);
        table->closeScan();
        icount++;
        conn.commit();
        timer.stop();
    }
    printf("%d rows selected %lld %lld %lld\n", icount, timer.minc(), timer.maxc(), timer.avg());
    timer.reset();

    for(i = LOAD; i< LOAD+ITERATIONS; i++)
    {
        timer.start();
        rv  = conn.startTransaction();
        if (rv != OK) exit (1);
        val1 = i;
        table->execute();
        tuple = (char*)table->fetch() ;
        if (tuple == NULL) {printf("loop break in %d\n", i);table->closeScan();break;}
        strcpy(name, "PRABAKARAN0950576543210");
        table->updateTuple();
        table->closeScan();
        conn.commit();
        timer.stop();
    }
    printf("%d rows updated %lld %lld %lld\n", i- LOAD, timer.minc(), timer.maxc(), timer.avg());


    icount=0;
    for(i = LOAD; i< LOAD+ITERATIONS; i++)
    {
        timer.start();
        rv = conn.startTransaction();
        if (rv != OK) exit (1);
        val1 = i;
        table->execute();
        tuple = (char*)table->fetch() ;
        if (tuple == NULL) {printf("No record for %d\n", i);table->closeScan();break;}
        table->deleteTuple();
        icount++;
        table->closeScan();
        conn.commit();
        timer.stop();
    }
    printf("%d rows deleted %lld %lld %lld\n", icount, timer.minc(), timer.maxc(), timer.avg());


    dbMgr->closeTable(table);
    dbMgr->dropTable("t1");
    printf("Table dropped\n");

    conn.close();
    return 0;
}
Пример #6
0
int
runDeleteTest (SQLHANDLE henv, SQLHANDLE hdbc, SQLHANDLE hstmt)
{
  int rc,i;
  int iHolder;
  
  timer.reset();
  for(i=0;i<ITERATION;i++){
    timer.start();
   
     rc = SQLConnect (hdbc,
                     (SQLCHAR *) DSN, SQL_NTS,
                     (SQLCHAR *) "root",
                     (SQLSMALLINT) strlen ("root"),
                     (SQLCHAR *) "manager",
                     (SQLSMALLINT) strlen (""));
   
     if (SQL_SUCCEEDED(rc)) {
        if (rc == SQL_SUCCESS_WITH_INFO) {
          printf("Driver reported the following diagnostics\n");
          extract_error("SQLDriverConnect", hdbc, SQL_HANDLE_DBC);
        }
     }else {
           fprintf(stderr, "Failed to connect\n");
           extract_error("SQLDriverConnect", hdbc, SQL_HANDLE_DBC);
      }
    
       //check_error (SQL_HANDLE_DBC, hdbc, rc, __LINE__);
       checkrc (rc, __LINE__);
       rc = SQLSetConnectOption (hdbc, SQL_AUTOCOMMIT, SQL_AUTOCOMMIT_OFF);
       checkrc (rc, __LINE__);

       rc = SQLAllocHandle (SQL_HANDLE_STMT, hdbc, &hstmt);
       checkrc (rc, __LINE__);

  
       rc = SQLPrepare (hstmt, (unsigned char *)"DELETE FROM t1 WHERE f1 = ?", SQL_NTS);
       checkrc (rc, __LINE__);
       rc = SQLBindParameter (hstmt, 1, SQL_PARAM_INPUT, SQL_C_LONG, SQL_INTEGER,
			 0, 0, &iHolder, 0, NULL);
       checkrc (rc, __LINE__);
       
       iHolder = 0;
       int tCount;
  
	  iHolder = i ;
	  rc = SQLExecute (hstmt);
	  checkrc (rc, __LINE__);
	  rc = SQLTransact (henv, hdbc, SQL_COMMIT);
	  checkrc (rc, __LINE__);

	  rc = SQLFreeHandle (SQL_HANDLE_STMT, hstmt);
	  checkrc (rc, __LINE__);
	  rc = SQLDisconnect (hdbc);
	  checkrc (rc, __LINE__);

	  timer.stop ();
  }
  printf ("Delete: %lld  %lld  %lld\n", timer.minc (), timer.maxc (),timer.avg ());
  return 0;

}
Пример #7
0
int
runUpdateTest (SQLHANDLE henv, SQLHANDLE hdbc, SQLHANDLE hstmt)
{
  int rc,i;
  int iHolder;
  char sHolder[200];
  char sData[200];

  timer.reset();
  for(i=0;i<ITERATION;i++){
  timer.start();
   
     rc = SQLConnect (hdbc,
                     (SQLCHAR *) DSN, SQL_NTS,
                     (SQLCHAR *) "root",
                     (SQLSMALLINT) strlen ("root"),
                     (SQLCHAR *) "manager",
                     (SQLSMALLINT) strlen (""));
   
     if (SQL_SUCCEEDED(rc)) {
        if (rc == SQL_SUCCESS_WITH_INFO) {
          printf("Driver reported the following diagnostics\n");
          extract_error("SQLDriverConnect", hdbc, SQL_HANDLE_DBC);
        }
     }else {
           fprintf(stderr, "Failed to connect\n");
           extract_error("SQLDriverConnect", hdbc, SQL_HANDLE_DBC);
      }  
       checkrc (rc, __LINE__);
       rc = SQLSetConnectOption (hdbc, SQL_AUTOCOMMIT, SQL_AUTOCOMMIT_OFF);
       checkrc (rc, __LINE__);
       rc = SQLAllocHandle (SQL_HANDLE_STMT, hdbc, &hstmt);
  
  rc = SQLPrepare (hstmt,
		   (unsigned char *) "UPDATE t1 SET f2 = ? WHERE f1 = ?",
		   SQL_NTS);
  checkrc (rc, __LINE__);
  SQLINTEGER sLen = SQL_NTS;
  rc = SQLBindParameter (hstmt, 1, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR,
			 196, 0, (void *) sHolder, 0, &sLen);
  checkrc (rc, __LINE__);
  rc = SQLBindParameter (hstmt, 2, SQL_PARAM_INPUT, SQL_C_LONG, SQL_INTEGER,
			 0, 0, &iHolder, 0, NULL);
  checkrc (rc, __LINE__);
  iHolder = 0;
  strcpy (sData, "9876543210987654321098765432109876543210");

  int tCount;

	  iHolder = i ;
	  strcpy (sHolder, sData);
	  rc = SQLExecute (hstmt);
	  checkrc (rc, __LINE__);
	  rc = SQLTransact (henv, hdbc, SQL_COMMIT);
	  checkrc (rc, __LINE__);
	  
	  rc = SQLFreeHandle (SQL_HANDLE_STMT, hstmt);
	  checkrc (rc, __LINE__);
	  rc = SQLDisconnect (hdbc);
	  checkrc (rc, __LINE__);
	  timer.stop ();
     }
     printf ("Update: %lld  %lld  %lld\n", timer.minc (), timer.maxc (),timer.avg ());
     return 0;
}
Пример #8
0
int
runReadTest (SQLHANDLE henv, SQLHANDLE hdbc, SQLHANDLE hstmt)
{
  
    int iHolder;
    char sHolder[200];
    char sData[200];
      
    int tempTermVar = 0;
    int tempTermVal = 0;
    int rc,i;

  timer.reset(); 
  for(i=0;i<ITERATION;i++){
  timer.start();
   
     rc = SQLConnect (hdbc,
                     (SQLCHAR *) DSN, SQL_NTS,
                     (SQLCHAR *) "root",
                     (SQLSMALLINT) strlen ("root"),
                     (SQLCHAR *) "manager",
                     (SQLSMALLINT) strlen (""));
   
     if (SQL_SUCCEEDED(rc)) {
        if (rc == SQL_SUCCESS_WITH_INFO) {
          printf("Driver reported the following diagnostics\n");
          extract_error("SQLDriverConnect", hdbc, SQL_HANDLE_DBC);
        }
     }else {
           fprintf(stderr, "Failed to connect\n");
           extract_error("SQLDriverConnect", hdbc, SQL_HANDLE_DBC);
      }
    
       //check_error (SQL_HANDLE_DBC, hdbc, rc, __LINE__);
       checkrc (rc, __LINE__);
       rc = SQLSetConnectOption (hdbc, SQL_AUTOCOMMIT, SQL_AUTOCOMMIT_OFF);
       checkrc (rc, __LINE__);
       rc = SQLAllocHandle (SQL_HANDLE_STMT, hdbc, &hstmt);
       checkrc (rc, __LINE__);

  // Set read-only transaction type 
  readOnlyTrans (hdbc);
  rc = SQLPrepare (hstmt, (unsigned char *)
		   "SELECT f1, f2 FROM t1 where f1 = ?", SQL_NTS);
  checkrc (rc, __LINE__);
  long sz = 0;
  rc = SQLBindParameter (hstmt, 1, SQL_PARAM_INPUT, SQL_C_LONG, SQL_INTEGER,
			 0, 0, &tempTermVar, 0, NULL);
  checkrc (rc, __LINE__);
  rc = SQLBindCol (hstmt, 1, SQL_INTEGER, &iHolder, 0, NULL);
  checkrc (rc, __LINE__);
  rc = SQLBindCol (hstmt, 2, SQL_C_CHAR, sHolder, sizeof (sHolder), NULL);
  checkrc (rc, __LINE__);
  iHolder = 0;
  strcpy (sData, "0123456789012345678901234567890123456789");

  int tCount;

	  tempTermVar = i ;
	  rc = SQLExecute (hstmt);
	  checkrc (rc, __LINE__);
	  rc = SQLFetch (hstmt);
	  checkrc (rc, __LINE__);
	  tempTermVal = iHolder;
	  strcpy (sData, sHolder);
	  rc = SQLCloseCursor (hstmt);
	  checkrc (rc, __LINE__);
	  rc = SQLTransact (henv, hdbc, SQL_COMMIT);
	  checkrc (rc, __LINE__);
	  
	  rc = SQLFreeHandle (SQL_HANDLE_STMT, hstmt);
	  checkrc (rc, __LINE__);
	  rc = SQLDisconnect (hdbc);
	  checkrc (rc, __LINE__);
	  timer.stop();
  
   }
   printf("Select: %lld  %lld  %lld\n", timer.minc(), timer.maxc(),timer.avg());
   return rc;

}
Пример #9
0
int main()
{
    DbRetVal rv = OK; 
    AbsSqlConnection *con = SqlFactory::createConnection(CSql);
    rv = con->connect("root", "manager");
    if (rv != OK) return 1;
    AbsSqlStatement *stmt = SqlFactory::createStatement(CSql);
    stmt->setConnection(con);
    char statement[1024];
    strcpy(statement, "CREATE TABLE t1 (f1 int, f2 char(196));");
    int rows =0;
    rv = stmt->prepare(statement);
    if (rv != OK) {delete stmt; delete con; return -1; }
    rv = stmt->execute(rows);
    if (rv != OK) {delete stmt; delete con; return -1; }
    stmt->free();
    printf("Table t1 created\n");

    strcpy(statement, "CREATE INDEX t1idx on t1 (f1);");
    rv = stmt->prepare(statement);
    if (rv != OK) {delete stmt; delete con; return -1; }
    rv = stmt->execute(rows);
    if (rv != OK) {delete stmt; delete con; return -1; }
    stmt->free();
    printf("Index created on t1(f1) \n");

    strcpy(statement, "INSERT INTO t1 (f1, f2) VALUES (?, ?);");
    int id1 =10;
    char name[196];
    strcpy(name, "Rithish");
    NanoTimer timer;
    rv = stmt->prepare(statement);
    if (rv != OK) {delete stmt; delete con; return -1; }
    int count =0;
    for (int i = 0 ;  i < ITERATIONS ; i++)
    {
       timer.start();
       rv = con->beginTrans();
       if (rv != OK) break;
       id1 =  i;
       stmt->setIntParam(1, id1);
       strcpy(name, "Gopika");
       stmt->setStringParam(2, name);
       rv = stmt->execute(rows);
       if (rv != OK) break;
       rv =  con->commit();
       if (rv != OK) break;
       timer.stop();
       count++;
    }
    printf("Total Rows Inserted %d %lld %lld %lld\n", count, timer.minc(), 
                                timer.maxc(), timer.avg());
    stmt->free();

    strcpy(statement, "SELECT * FROM t1 where f1 = ?;");
    rv = stmt->prepare(statement);
    if (rv != OK) {delete stmt; delete con; return -1; }
    stmt->bindField(1, &id1);
    stmt->bindField(2, name);
    timer.reset();
    count =0;
    for (int i = 0 ;  i < ITERATIONS ; i++)
    {
       timer.start();
       rv = con->beginTrans();
       if (rv != OK) break;
       stmt->setIntParam(1, i);
       stmt->execute(rows);
       if (stmt->fetch() == NULL) { printf("unable to read record\n"); break; }
       stmt->close();
       rv = con->commit();
       if (rv != OK) break;
       timer.stop();
       count++;
    }
    stmt->free();
    printf("Total Rows Selected %d %lld %lld %lld\n", count, timer.minc(), 
                                timer.maxc(), timer.avg());
    
    strcpy(statement, "UPDATE t1 set f2=? where f1=?;");
    rv = stmt->prepare(statement);
    if (rv != OK) {delete stmt; delete con; return -1; }
    stmt->bindField(1, &id1);
    stmt->bindField(2, name);
    timer.reset();
    count =0;
    for (int i = 0 ;  i < ITERATIONS ; i++)
    {
       timer.start();
       rv = con->beginTrans();
       if (rv != OK) break;
       stmt->setIntParam(2, i);
       stmt->setStringParam(1, "ChangedValue");
       rv = stmt->execute(rows);
       if (rv != OK && rows !=1) break;
       rv = con->commit();
       if (rv != OK) break;
       timer.stop();
       count++;
    }
    stmt->free();
    printf("Total Rows Updated %d %lld %lld %lld\n", count, timer.minc(), 
                                timer.maxc(), timer.avg());

    strcpy(statement, "DELETE FROM t1 where f1=?;");
    rv = stmt->prepare(statement);
    if (rv != OK) {delete stmt; delete con; return -1; }
    stmt->bindField(1, &id1);
    timer.reset();
    count =0;
    for (int i = 0 ;  i < ITERATIONS ; i++)
    {
       timer.start();
       rv = con->beginTrans();
       if (rv != OK) break;
       stmt->setIntParam(1, i);
       rv = stmt->execute(rows);
       if (rv != OK && rows != 1) break;
       rv = con->commit();
       if (rv != OK) break;
       timer.stop();
       count++;
    }
    stmt->free();
    printf("Total Rows Deleted %d %lld %lld %lld\n", count, timer.minc(), 
                                timer.maxc(), timer.avg());

    strcpy(statement, "DROP TABLE t1;");
    rv = stmt->prepare(statement);
    if (rv != OK) {delete stmt; delete con; return -1; }
    rv = stmt->execute(rows);
    if (rv != OK) {delete stmt; delete con; return -1; }
    stmt->free();
    printf("Table dropped\n");


    delete stmt;
    delete con;
    return 0; 
}