ALT Linux Bugzilla
– Attachment 7314 Details for
Bug 34338
Ошибка сегментирования
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
Исходный код тестовой программы
mysql++.cpp (text/x-c++src), 1.03 KB, created by
alexey
on 2017-12-13 18:31:39 MSK
(
hide
)
Description:
Исходный код тестовой программы
Filename:
MIME Type:
Creator:
alexey
Created:
2017-12-13 18:31:39 MSK
Size:
1.03 KB
patch
obsolete
>#include <stdlib.h> >#include <stdio.h> > >// MySQL++ >#include <mysql++.h> >#include <mysql_connection.h> > >// ÐагÑÑзка маÑÑива опиÑаний пакеÑов в ÐÐ MySQLpp веÑÑÐ¸Ñ >// (пÑи Ñоздании обÑекÑа Query пÑоиÑÑ Ð¾Ð´Ð¸Ñ segmentation fault) >int main(int argc, char *argv[]){ > if(argc<3){ > printf("Enter user and password!\n"); > return 1; > } > mysqlpp::Connection con; > if(!con.connect("information_schema", // db > "localhost",// server, > argv[1], // user, > argv[2], // password > 3306)){ // port > printf("Can't connect to DB!\n"); > return 1; > } > if(con.connected() && con.ping()){ > // Создание и оÑпÑавка запÑоÑа в Ñикле по вÑем пакеÑам > mysqlpp::Query q=con.query(""); > printf("MySQL++ ERROR: %s\n", con.error()); > } > // РазÑÑв ÑвÑзи Ñ ÐÐ > con.disconnect(); > printf("Everything went fine!"); > return 0; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 34338
: 7314