lrd_open_cursor(&Csr13, Con1, 0);
lrd_stmt(Csr13, "SELECT customer_no, agent_no FROM Orders WHERE order_number=108", -1, 1, 0 /*None*/, 0);
lrd_bind_cols(Csr13, BCInfo_D28, 0);
lrd_fetch(Csr13, 1, 1, 0, PrintRow16, 0);
GRID(16);
lrd_close_cursor(&Csr13, 0);
lrd_open_cursor(&Csr14, Con1, 0);
lrd_stmt(Csr14, "DELETE FROM Orders WHERE order_number=108", -1, 1, 0 /*None*/, 0);
lrd_close_cursor(&Csr14, 0);
lrd_open_cursor(&Csr15, Con1, 0);
lrd_stmt(Csr15, "SELECT COUNT(customer_no) FROM Orders WHERE customer_no=38", -1, 1, 0 /*None*/, 0);
lrd_bind_cols(Csr15, BCInfo_D30, 0);
lrd_fetch(Csr15, 1, 1, 0, PrintRow18, 0);
GRID(18);
lrd_close_cursor(&Csr15, 0);
lrd_open_cursor(&Csr16, Con1, 0);
lrd_stmt(Csr16, "DELETE FROM Customers WHERE customer_no=38", -1, 1, 0 /*None*/, 0);
lrd_close_cursor(&Csr16, 0);
lrd_open_cursor(&Csr17, Con1, 0);
lrd_stmt(Csr17, "SELECT COUNT(agent_no) FROM Orders WHERE agent_no=6", -1, 1, 0 /*None*/, 0);
lrd_bind_cols(Csr17, BCInfo_D32, 0);
lrd_fetch(Csr17, 1, 1, 0, PrintRow20, 0);
GRID(20);
lrd_close_cursor(&Csr17, 0);
lrd_open_cursor(&Csr18, Con1, 0);
lrd_stmt(Csr18, "COMMIT", -1, 1, 0 /*None*/, 0);
lrd_close_cursor(&Csr18, 0);
return 0;
}
创建方案是用手工方案,10个虚拟用户,迭代10次,在Controllerl中运行,结果如下:
Action.c(20): lrd_stmt: SELECT DISTINCT departure FROM Flights ORDER BY departure
Action.c(21): lrd_bind_col: Column=1
Denver
Los Angeles
Portland
San Francisco
Seattle
Action.c(22): lrd_fetch: 5 row(s) fetched (no more data)
Action.c(25): lr_think_time: 14.00 seconds.
Action.c(28): lrd_stmt: SELECT departure, flight_number, departure_initials, day_of_week, arrival_initials, arrival, departure_time, arrival_time, airlines, seats_available, ticket_price, mileage FROM Flights WHERE arrival = 'Portland' AND departure = 'Denver' AND day_of_week = 'Wednesday'ORDER BY flight_number
Action.c(33): lrd_bind_col: Column=1
Action.c(33): lrd_bind_col: Column=2
Action.c(33): lrd_bind_col: Column=3
Action.c(33): lrd_bind_col: Column=4
Action.c(33): lrd_bind_col: Column=5
Action.c(33): lrd_bind_col: Column=6
Action.c(33): lrd_bind_col: Column=7
Action.c(33): lrd_bind_col: Column=8
Action.c(33): lrd_bind_col: Column=9
Action.c(33): lrd_bind_col: Column=10
Action.c(33): lrd_bind_col: Column=11
Action.c(33): lrd_bind_col: Column=12
Denver, 1492, DEN, Wednesday, POR, Portland,01:59 PM, 03:40 PM, TWA, 250, 146, 1292
Denver, 4659, DEN, Wednesday, POR, Portland,03:11 PM, 04:52 PM, TWA, 250, 128, 4459
Denver, 5237, DEN, Wednesday, POR, Portland,05:35 PM, 07:16 PM, TWA, 250, 149, 5037
Denver, 5471, DEN, Wednesday, POR, Portland,07:59 AM, 09:40 AM, TWA, 250, 135, 5271
Denver, 7563, DEN, Wednesday, POR, Portland,12:47 PM, 02:28 PM, TWA, 250, 145, 7363
Action.c(34): lrd_fetch: 5 row(s) fetched (no more data)
Action.c(37): lr_think_time: 17.00 seconds.
Action.c(40): lrdb_stmt: "SQLExecDirect", return-code=-1, native-error-code=-1038, SQLState=40001, SQLError=[Quadbase][ODBC Driver][QBSERVER]
Number of records updated: 0
Time out waiting for locks
Action.c(40): lrd_stmt: ERROR, return-code=LRDE2009. UPDATE Counters SET counter_value=counter_value+1 WHERE table_name='ORDERS'
Abort was called from an action.
Ending Vuser...
Starting action vuser_end.
Ending action vuser_end.
Vuser Terminated.
请问这个错误是什么原因?怎么解决。请各位大侠帮帮忙,不胜感激?另外,本人刚学,不知有没有别的好的学习方法,请大家指点。